RE: Regex Problem

2002-07-31 Thread John Francis
sh: > > $foo = "something"; > $bar = "\${foo}"; > $bar =~ s/\$\{\(\w+)\}/$$1/g; > print $bar; > > OUTPUT: > > something > > I am getting an error: > > Can't use string ("something") as a SCALAR ref while "strict refs"

Re: Regex Problem

2002-07-28 Thread John Francis
Jess, Try: s/\$\{(\w+)\}/\$${1}/g; if i understood your problem correctly =) - John On Sun, 28 Jul 2002, Balint, Jess wrote: > Hello all. I am getting an error with the following reg-exp: > > s/\$\{(\w+)\}/$$1/g; > > I am not sure exactly how to

Re: comparing to everything in an array?

2002-07-28 Thread John Francis
Tara, Try this: foreach $elemenet(@fooarray){ if($element eq $foo){ things_happen; } } - John On Sun, 28 Jul 2002, Tara Calishain wrote: > Gentle Perl peo