Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Sequential Replacement

by DamnDirtyApe (Curate)
on Jul 09, 2002 at 17:44 UTC ( [id://180553]=note: print w/replies, xml ) Need Help??


in reply to Sequential Replacement

This works for me:

#! /usr/bin/perl use strict ; use warnings ; my @arr = qw/ cidaris see doing / ; my $str = <<'EOD' ; Hello, ##REPLACE##. Nice to ##REPLACE## you. How are you ##REPLACE## today? EOD my $i = 0 ; $str =~ s/##REPLACE##/$arr[$i++]/g ; print $str ;

_______________
D a m n D i r t y A p e
Home Node | Email

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-26 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found