At 09:01 28/06/2003, you wrote:

>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/;
>}


can you not add "global"
ie s/search/replace/g 


>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]
>
>
>
>---
>pased check
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
---
Outgoing mail was scaned pased Virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to