Think about Loose Coupling | |
PerlMonks |
Re: Faster replacement of sed commands..by pvaldes (Chaplain) |
on Aug 20, 2014 at 23:23 UTC ( [id://1098176]=note: print w/replies, xml ) | Need Help?? |
unrelated with the topic, but perhaps useful to make your script a little faster: you could want to put the whole "/data/admin/scsripts/SapcmedadpebM/xdecoder/decodedir" thing in a var. The purpose of this is to avoid typing mistakes and to write shorter sentences easier to debug. Something like: (untested).
You probably don't need to use the touch line here, just open the file. Open avoids you later the need for an one-liner inside a perl script, (bad style to me, you are opening two perl processes and the second is not necessary) `perl -i -pe 's/[^[:ascii:]]//g; tr/\015//d' $abc1`; ## to avoidavoid `find -mmin ...`, use stat instead:
No need to spend four lines for this, probably: next if ($abc1 eq "");
In Section
Seekers of Perl Wisdom
|
|