Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: foreach type of deal?

by BillKSmith (Monsignor)
on Mar 15, 2017 at 23:07 UTC ( [id://1184787]=note: print w/replies, xml ) Need Help??


in reply to Re^2: foreach type of deal?
in thread foreach type of deal?

Do we ever have perfect data? I prefer to use a test to warn about invalid data. The following code (untested) makes use of runtime switches (ref: perldoc perlrun). Use -p for the I/O and -i for backup.
#!perl -p -ibak if (!s/^g(Ord_\d{4}\.png)\s*$/$1/) { warn "Invalid line: $_\n"; $_ = <>; redo; }
Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found