Re: regex question with s///

2001-07-19 Thread Jason Ledbetter
Ergh. I've got this feeling I misunderstood your question. If so, forgive me. -- Jason Ledbetter Data Conversion Specialist Perl Monk and Ascii Ninja Cadmus Professional Communications [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: regex question with s///

2001-07-19 Thread Jason Ledbetter
for my $i (1 ... $num) { s/$pat/$pat+$i/; } Get me? -- Jason Ledbetter Data Conversion Specialist Perl Monk and Ascii Ninja Cadmus Professional Communications [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: regex question with s///

2001-07-19 Thread Bob Showalter
Bradford Ritchie wrote: > Is it possible to take a string ($pat) do a substitution on > it and print the result, without actually changing the > contents of the original variable? No; you have to do the subsitution on a copy. > > Basically, I'm trying to write a script that will take a > str