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

tiger peng tigerpeng2001 at yahoo.com
Fri Jan 11 19:55:57 PST 2008

Is the script not for UNIX/Linux? I investigated the failure of some scripts moved from Linux to Windows (Cygwin). There were some subtle differences between these two environments on opening/closing file handle.

----- Original Message ----
From: Richard Reina <richard at rushlogistics.com>
To: Chicago.pm chatter <chicago-talk at pm.org>
Sent: Wednesday, January 9, 2008 1:18:25 PM
Subject: Re: [Chicago-talk] A CLUE @ARGV while(<>)


Thank you very much for the suggested rewrite for the subroutine.  So far it has not hung (fingers crossed).  However,  the lines with espf[ in them are not being removed with:

next if $line =~ m/espf\[/;

For example, if the $in_file contains the line:

^epsf[cs.45]{../rush_graphics/truck_slogan5.eps}it does not get removed.  Did I do something wrong?

Ted Zlatanov <tzz at lifelogs.com> wrote: sub delimit {
 my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_;

 return unless defined $in_file;
 open IN, '<', $in_file or warn "Could not open $in_file: $!";
 my @lines;

 while (my $line = )
  next if $line =~ m/espf\[/;
  push(@lines, $line);

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

More information about the Chicago-talk mailing list