mipatel has asked for the wisdom of the Perl Monks concerning the following question:
i have a script that generates the output with the fullpath of the directory.
i want the output asExample y:/home/lib/directory/book y:/home/lib/directory/book_manager y:/home/lib/directory/piano_book
is there any regex for this guys? i tried doing this but it still leaves the slash at the end $output =~ s{.*(/)}{$1};book book_manager piano book
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to remove everything before last slash in perl?
by roboticus (Chancellor) on Jun 23, 2012 at 19:52 UTC | |
by mipatel (Novice) on Jun 23, 2012 at 19:56 UTC | |
by Jim (Curate) on Jun 24, 2012 at 02:34 UTC | |
|
Re: how to remove everything before last slash in perl?
by muba (Priest) on Jun 23, 2012 at 20:08 UTC | |
by Tux (Canon) on Jun 23, 2012 at 22:58 UTC | |
|
Re: how to remove everything before last slash in perl?
by 7stud (Deacon) on Jun 23, 2012 at 21:32 UTC | |
|
Re: how to remove everything before last slash in perl?
by kcott (Archbishop) on Jun 24, 2012 at 12:53 UTC | |
|
Re: how to remove everything before last slash in perl?
by Anonymous Monk on Jun 24, 2012 at 04:08 UTC | |
by Anonymous Monk on Jun 24, 2012 at 04:35 UTC |