Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Flipin good, or a total flop?

by GrandFather (Saint)
on Jan 25, 2006 at 09:44 UTC ( [id://525392]=perltutorial: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<DATA>) {
        print "\t" if (/^start/ .. /^end/);
    ...
    Indented line
    end
    Back to left margin
    
  2. or download this
    First line.
        start
        Indented line
        end
    Back to left margin
    
  3. or download this
    while (<DATA>) {
        print "\t" if (/start/ .. /end/);
    ...
    First line.
    Indent lines between the start and the end markers
    Back to left margin
    
  4. or download this
    First line.
        Indent lines between the start and the end markers
    Back to left margin
    
  5. or download this
    while (<DATA>) {
        print "\t" if (/start/ ... /end/);
    ...
    So this is indented,
    and this is the end of the indented block.
    Back to left margin
    
  6. or download this
    First line.
        Indent lines between the start and the end markers
        So this is indented,
        and this is the end of the indented block.
    Back to left margin
    
  7. or download this
    while (<DATA>) {
        print "\t" if (2 .. 4);
    ...
    end
    
    Back to left margin
    
  8. or download this
    First line.
        start
        Indented line
        end
    Back to left margin
    
  9. or download this
    print join ' ', (1..5);
    
  10. or download this
    1 2 3 4 5
    
  11. or download this
    my @array = qw(1 2 3 4 5 6 7 8 9);
    print "@array[0..3]";
    
  12. or download this
    1 2 3 4
    
  13. or download this
    my @array = qw(1 2 3 4 5 6 7 8 9);
    print "$array[0..3]";
    
  14. or download this
    use strict;
    use warnings;
    my @array = qw(1 2 3 4 5 6 7 8 9);
    print "$array[0..3]";
    
  15. or download this
    Use of uninitialized value in range (or flip) at noname.pl line 4.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2024-04-18 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found