Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

quotes in Perl

by apotheon (Deacon)
on Oct 20, 2004 at 22:33 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: perltutorial [id://401006]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found