more useful options | |
PerlMonks |
Grab Current Line of SVG Fileby beginAgain (Novice) |
on Apr 17, 2019 at 14:55 UTC ( [id://1232717]=perlquestion: print w/replies, xml ) | Need Help?? |
beginAgain has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I have been tasked with "correcting" certain items in SVG files. I have never used Perl and after a crash course (using PerlMonks, Stack Overflow, etc.) I can successfully read the SVG file line by line and correct the necessary lines. My final problem, and this is admittedly because of my inexperience, I cannot figure out how to grab the current line so I can do a smartmatch (or something similar). All I need to do is make sure that the current line starts with "<path" and process that line if so. Below is the (partial) code where I read in the file and loop through the lines to make the corrections.
EDIT - Ihave added more of the code to show what I want to do with smartmatch - NOTE thta target is set like so: my $target = '<path'; I have tried (sad attempts): Print (<IN>) Print IN etc. But none of these are grabbing the actual text for that line Any help will be greatly appreciated... Charles
Back to
Seekers of Perl Wisdom
|
|