Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Find Replace text with list

by moritz (Cardinal)
on Feb 07, 2011 at 14:41 UTC ( [id://886698]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Find Replace text with list
in thread Find Replace text with list

Which code produced that error?

Replies are listed 'Best First'.
Re^4: Find Replace text with list
by wa2nlinux (Novice) on Feb 07, 2011 at 15:13 UTC
    When I read my @replace as array from a file and try to subtitute
    open(FData,"< data") || die("Cannot Open File"); my @replace=<FData>; for my $replace (@replace) { $s =~ s/$replace->[0]/$replace->[1]/gee; }
        Yes, I already modified the source but the point is same, I wonder if can read file each line as array and then just call it like :
        ( [ qr/\/ka/ => '"ku"' ], [ qr/\/hi/ => '"he he he"' ], );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://886698]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-23 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found