Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Grab Current Line of SVG File

by tangent (Vicar)
on Apr 17, 2019 at 15:58 UTC ( #1232722=note: print w/replies, xml ) Need Help??


in reply to Grab Current Line of SVG File

You could try something like this:
opendir( my $dir, $dirname ); my @in = grep { /^[^.]/ && -f "$dirname/$_" } readdir( $dir ); closedir $dir; for my $file (@in) { open( my $infile, '<', "$dirname/$file" ) or next; open( my $outfile, '>', "$outdirname/$file" ) or die "can't open f +ile output/$file: $!"; while ( my $line = <$infile> ) { $line =~ s/rotate\(-180/rotate\(-0/g; if ( $line =~ m/$target/ ) { for my $key (keys %stroke_width_hash) { $line =~ s/$key/$stroke_width_hash{$key}/g; } } print $outfile $line; } close $outfile; close $infile; }

Replies are listed 'Best First'.
Re^2: Grab Current Line of SVG File
by beginAgain (Novice) on Apr 17, 2019 at 16:26 UTC
    Thank you for replying :) - I have solved it with something mentioned by another poster - see my comments

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-01-17 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (51 votes). Check out past polls.

    Notices?