in reply to Screenshot with Perl

Hello Perlchaoui

use the module URI to break the url and use parts you needs (update: and discard unneeded parts that breaks filename creation):

use URI; ... my $url = shift; # https://www.tricentis.com/ my $uri = URI->new( $url ); my $filename = $uri->host().'.png'; #or whatever you prefere

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Screenshot with Perl
by Perlchaoui (Sexton) on Nov 12, 2018 at 11:31 UTC

    Hello Discipulus

    A big Thank you. It's working fine. I wasn't aware about this module. Really useful.

    Just another remark . How can i add a link to a user when mentioning him in a post? In a comment for Perlmonks?

        Greetings

        Thanks marto :)