Linux Rocks ! wrote:
> : Note the "s" character at the end. It makes the whole thing
> : work even if the tag spans multiple lines.
Oops. I forgot -- to read the whole file into the string, you need
this at the beginning of the perl script. See the perlvar man page
for details.
BEGIN { undef $/ }
So the whole thing would be...
> find /var/www/htdoc -type f | xargs perl -p -i.orig -e \
> 'BEGIN {undef $/} s/\<img [^\>]*alt=\"([^\"]*)\"/title="$1"/gis'
--
Bob Miller K<bob>
kbobsoft software consulting
http://kbobsoft.com [EMAIL PROTECTED]