[Chicago-talk] A CLUE @ARGV while(<>)

Richard Reina richard at rushlogistics.com
Tue Jan 8 06:55:49 PST 2008

Progress, maybe.  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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20080108/3b531d01/attachment.html 

More information about the Chicago-talk mailing list