Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 wandering the Monastery: (4)
As of 2014-08-30 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls