Closed Thread Icon

Preserved Topic: Perl double quote interpolation problem (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18353" title="Pages that link to Preserved Topic: Perl double quote interpolation problem (Page 1 of 1)" rel="nofollow" >Preserved Topic: Perl double quote interpolation problem <span class="small">(Page 1 of 1)</span>\

 
Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-20-2001 01:33

OK, I want to interpolate a variable in a quote, and then have something in squiggly brackets right after it, like:

"$myvar{ladeda}"

Obviously, it thinks I'm trying to interpolate a hash element, and gives me an error. Is there a good way around this without string concatenation?

kevincar
Paranoid (IV) Inmate

From: north hills, ca usa
Insane since: Apr 2001

posted posted 07-20-2001 05:09

Can you escape it? Like "$myvar\{ladeda\}" ??




mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-20-2001 13:09

Yes, you can simply escape curly brackets...

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-20-2001 14:04

Oh. Right. Heh =)

« BackwardsOnwards »

Show Forum Drop Down Menu