Instead of slurping the file into a scalar (that's what i call converting a filehandle to a string), did you know that Perl has an "in-place editing" mode?
This will replace all accurrances of this with that in the specified file and make a backup copy for you (i chose a .bak extension). Doesn't answer your question, but it is a much better way to accomplish the task, IMHO. ;)perl -pi.bak -e"s/this/that/g" /var/www/html/acs/new/index.html
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Converting FILEHANDLE to string
by jeffa
in thread Converting FILEHANDLE to string
by joev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |