I don't know how to use URI::URI to solve my problem after reading the pod doc. since it is not easy to use regex, I am going to use split '/', $url to extract the last field.
On 4/26/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 4/25/06, nishanth ev <[EMAIL PROTECTED]> wrote: > > > if( $url =~ /\/([\w.]*$)/ ){ > > print $1; > > } > > http://example.com/some-file.txt > > > > To process a URL requires more than a simple pattern > > > match. Use a > > > module from CPAN. Cheers! > > What I said. > > --Tom Phoenix > Stonehenge Perl Training > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"[EMAIL PROTECTED] ")' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>