in reply to Skipping data on file read
If I've correctly interpreted what you're looking for, and there's no odd cases not shown in your sample data, this can be greatly simplified. Just grab each line, throw out the junk, then pull off your data with regexes. For example:
my @data; while (my $line = <$FILE>){ next if $line =~ /^c/; ($line, undef) = split /\$/, $line, 2; push @data, $line =~ /\d+\.30c/g; push @data, $line =~ /\w+\.01t/g; }
|
|---|