[Gllug] Awk Sed

Alex Hudson home at alexhudson.com
Sat Dec 8 11:08:07 UTC 2001


On Sat, 2001-12-08 at 10:58, Colin Coles wrote:
> There's a useful little script called swap.pl that I often use for recursive 
> search & replace, saves having to remember long & complex commands.
> http://www.cgiware.com/swap.htm

You trust your data with _that_ ??

The highlight of the whole script, for me, was:

if(-d "$dirpath$file"){
$doit[$#doit + 1] = "$search^^$replace^^$dirpath$file";
}

I vote $doit[$#doit+1] to be the most gross misuse of perl context
operators that I have seen in a long, long time... ;)

Cheers,

Alex.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011208/154e1a74/attachment.pgp>


More information about the GLLUG mailing list