Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: assign a string using multiline format

by chibiryuu (Beadle)
on Aug 26, 2005 at 14:54 UTC ( #486880=note: print w/replies, xml ) Need Help??


in reply to Re^3: assign a string using multiline format
in thread assign a string using multiline format

my $foo = 'bar'; print <<END; 1. \$foo is $foo END print <<"END"; 2. \$foo is $foo END print <<'END'; 3. \$foo is $foo END print <<`END`; echo 4. \$foo is $foo END
results in
1. $foo is bar 2. $foo is bar 3. \$foo is $foo 4. $foo is bar
See perlop#Quote-and-Quote-like-Operators.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://486880]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-07-21 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (443 votes). Check out past polls.

    Notices?