[sf-perl] Hanging with the diamond operator?
Daniel Lo
woof at danlo.com
Tue Jan 8 13:29:50 PST 2008
Hello Daniel,
Does $in_file come over NFS? Sometimes when NFS hangs, it causes a weird fight
between perl and the OS on freeBSD.
-daniel
Tuesday, January 8, 2008, 1:17:32 PM, you wrote:
> Hello Richard,
> Could you provide a sample file that causes the problem?
> -daniel
> Tuesday, January 8, 2008, 12:58:21 PM, you wrote:
>> The script below is called from another perl script that runs on linux
>> console on a few machines here. The problem is that sometimes the
>> script hangs.
>> I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/);
>> I believe this because in cases when it hangs, if I do a Cntl-C I get:
>> Not a subroutine reference at ./file_delimiter.pl line 24, <> line3.
>> This is turning out to be a disruptive problem here. Any help would
>> be greatly appreciated.
>> #!/usr/bin/perl5 -w
>> use warnings;
>> use strict;
>> sub delimit {
>> my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_;
>> if (defined $in_file) { # file submited
>> @ARGV = $in_file;
>> $body = "";
>> while(<>) {
>> push(@lines, $_) unless (/espf\[/); # hangs here sometimes
>> } # end of while
>> } # end of if
>> } # end of sub
>> _______________________________________________
>> SanFrancisco-pm mailing list
>> SanFrancisco-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
--
Best regards,
Daniel mailto:woof at danlo.com
More information about the SanFrancisco-pm
mailing list