Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Interpolation: when it occurs? another beginner question..

by Discipulus (Vicar)
on Feb 25, 2013 at 11:50 UTC ( #1020500=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use strict;
    descr is null and list is empty
    descr is null and list is empty
    descr is null and list is empty
  2. or download this
    my $text = q{
      Dear $person,
      I know that this text is not interpolated.
      But I wish it could be...
  3. or download this
    my $n = sub {1};
    my $m = sub {&$n*2};
    1 2 4
    2 4 8
  4. or download this
      How can I expand variables in text strings?
        Let's assume that you have a string that contains placeholder vari
            $text =~ s/\$(\w+)/$user_defs{$1}/g;
  5. or download this
    my $color = "red";
    my $fruit = "apple";
    >>Hi, my name is $name.  Please hand me a $color $fruit.<<
    ->Hi, my name is chromatic.  Please hand me a red apple.<-

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1020500]
Front-paged by Arunbear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2015-11-29 07:47 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (749 votes), past polls