in reply to Re: Complex string parsing
in thread Complex string parsing
Again, many thanks! Regards, Stacy.open(TMP,'file.txt'); while($line = <TMP>) { chomp($line); next if $line =~ /^Total/; next if $line =~ /^\d+/; ($path) = split(/\s+/,$line); if (-d "$path") { if ($path =~ m!/$!) { $dir = (split /\//, $path)[-1]; print "/$dir/=/$dir\n"; } } } close(TMP);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:{3} Complex string parsing
by jeroenes (Priest) on Apr 25, 2001 at 15:59 UTC |