in reply to Parse a line

Well it just sits there cause this:
while (<>)
will wait for input from STDIN. So it's just sitting there waiting for input. If you just want the last word in that sample, this should do it:
my $sample = 'sample/fresh/fresh/0/pineapple'; my $word = $sample; $word =~ s/.*\///;

Replies are listed 'Best First'.
Re^2: Parse a line
by hypergrid (Initiate) on Dec 10, 2004 at 15:16 UTC
    That was quick and it works!
    Thanks very much!