in reply to Regular Expressions Matching with Perl

If you were able to use modules, i would suggest Archive::Zip. But here is a non-module solution:
$line =~ s/^\s+//g; # strip leading whites +pace $line =~ s/\s+$//g; # strip trailing white +space my @cols = split(/ +/, $line); # split on spaces my $filename = join(' ', splice(@lines, 7) ); # piece back together +the filename push @temp, $filename; # store filename
Could possibly try a fixed-width solution, but i'd be worried that it wouldn't work if the first or third columns varied too much in size.

Update: I think i overthought a little and forgot about the LIMIT parameter to split() -- probably better than breaking and re-gluing the filename.

Replies are listed 'Best First'.
Re^2: Regular Expressions Matching with Perl
by nimdokk (Vicar) on Apr 20, 2005 at 17:46 UTC
    I've thought about Archive::Zip as well, but its not one on our system. :-)
      there is an alternative way to "install" pure perl modules: copy&paste their source code directly on your script... it will require some changes, but usually small, trivial ones.