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

Richard Reina richard at rushlogistics.com
Fri Jan 4 13:44:45 PST 2008

I have a script like the one below that looks though a file and removes any line that contains the sequence "epsf[". 

Sometimes it hangs and I can't figure out why, although I suspect that it might be my while (<>)  loop.  Is there is something that I am doing that is careless that might hint as to why the program sometimes hangs?

#!/usr/bin/perl5 -w 

@ARGV = $infile;

my $body = "";

while(<>) {
    unless(/epsf\[/) {
            $body = $body . $_;

Your beliefs become your thoughts.  Your thoughts become your words.  Your words become your actions.  Your actions become your habits.  Your habits become your values.  Your values become your destiny.  -- Mahatma Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20080104/a2ca8aba/attachment.html 

More information about the Chicago-talk mailing list