Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

quotes in Perl

by apotheon (Deacon)
on Oct 20, 2004 at 22:33 UTC ( #401006=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = 'it is worth $foo';
    print $bar;
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = "it is worth $foo";
    print $bar;
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = "it is \"worth\" $foo";
    print $bar;
    
  4. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = 'it is \'worth\' $foo';
    print $bar;
    
  5. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = q(it is 'worth' $foo);
    print $bar;
    
  6. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = qq(it is "worth" $foo);
    print $bar;
    
  7. or download this
    @baz = ('one', 'two', 'three');
    
    @baz = qw(one two three);
    
  8. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo = 123.45;
    ...
       foo: $foo
       bar: $bar
    EOT
    
  9. or download this
    =====
    
    This is an example of
    ...
       variable names appear.
       foo: 123.45
       bar: Martha Stewedprune
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-02 00:33 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 (25 votes), past polls