Some time ago, Dave Cross said:
Why bother wrestiling with complex regular expressions when someone else has already done the work? Perl has a URI module ("yum install perl-URI") which understands how URIs (and URLs) work. I'd recommend using that. use URI; my $url = URI->new('http://somesite.org/somefile.zip'); say $url->path; # prints "/somefile.zip" Then there's the File::Basename module (included with the Perl distribution) for dealing with file paths. use File::Basename; say basename($url->path); # prints somefile.zip Perl programming gets a lot easier if you use the tools that are already there. Cheers. Dave...
Thanks Dave, I will keep it in mind. Regards, Lázaro. ***************************************************************************** * Este mensaje de correo electrónico ha sido procesado por el * * Servidor de Correo Electrónico de Frioclima y es un correo * * válido para el dominio: frioclima.com.cu * ***************************************************************************** -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org