in reply to Re^2: Regular Expressions Matching with Perl
in thread Regular Expressions Matching with Perl

You wouldn't need to run substr on the whole file at one time, you would run it against each line of the file separately like this:
use strict; use warnings; use Data::Dumper; my @Temp; use constant FileNameStart => 58; while(<DATA>) { chomp(); push(@Temp, substr($_,FileNameStart)); } print(Dumper(@Temp)); __DATA__ 0 Stored 0 0% 04-20-05 08:43 00000000 test 1 2 3.z +ip 704106 DeflatN 83362 89% 04-04-05 19:00 8e76dc22 file1.dat

Replies are listed 'Best First'.
Re^4: Regular Expressions Matching with Perl
by ikegami (Patriarch) on Apr 20, 2005 at 19:28 UTC

    I was talking about the size of the file in the archive, not the size of the output.

    For example, add:
    10000000  DeflatN  83362  89%  04-04-05  19:00  8e76dc22   file2.dat
    or
     704106  DeflatN  4      100%  04-04-05  19:00  8e76dc22   file3.dat
    to your __DATA__ and you'll notice an extra space in front of the file name. Now, I'm not sure how his unzip program handles these cases, so substr may actually work.