Forum Moderators: coopster & phranque
( $name ) = split( /[\?\#]/, $ENV{REQUEST_URI} ); ( $name ) = ( $name =~ m#([^/]+)$# );
Just wondering if there is a faster and or easier way to do the above. Works well, and is better than the method I was trying to get working...
Regular expressions in perl are 'greedy'. They will match as much as possible in most cases. This example will remove everything up to and including the last forward slash (/).