Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.

by olivierp (Hermit)
on Dec 09, 2004 at 08:51 UTC ( #413453=note: print w/ replies, xml ) Need Help??


in reply to Re: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.
in thread Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.

Doh !
Thanks to fglock and Errto for pointing out the obivous.
This at least "fixes" my $var3:

my ($var3) = map { s/\r?\n\Z/(munched)/; $_ } <<EOT; Var also has an interpolated var: $interpolated And the last newline is also absent -> EOT
However, $var4 still explodes on a read-only value, and I still haven't found, apart from eval'ing the whole thing, how to do the same for $href->{key3} = {...

--
Olivier


Comment on Re^2: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.
Download Code
Re^3: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.
by fglock (Vicar) on Dec 09, 2004 at 12:55 UTC

    Very interesting - that's because an interpolated string is actually an unnamed variable, while a simple string is just a constant.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-04 17:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls