I have the following problem: I just read in a file <FILE>... in ONE of line of the file, there is a word I need to substitute... but I realize that: $a = <FILE> would assign $a the first line of the file @a = <FILE> world assign each line of the file as an element of @a... now...s/search/replace/ only works for string... is there a way to avoid looping through the file (or elements of @a to do this search/replace?) now the way I am doing is:
foreach $m (@a){ $m =~ s/search/replace/; } is there way to avoid this loop? (such as reading the whole file into a single scalar?) __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]