http://www.perlmonks.org?node_id=978008

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.

Example y:/home/lib/directory/book y:/home/lib/directory/book_manager y:/home/lib/directory/piano_book
i want the output as
book book_manager 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};