G'day Sunil,
As already pointed out, your unformatted data is problematic; however, you may find that split is sufficient for your needs.
$ perl -le 'print +(split /\//)[-1] for ("/ba/mn/first one", "/ba/mn/s +econd")' first one second
-- Ken
In reply to Re: Pattern Matching
by kcott
in thread Pattern Matching
by sunil@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |