Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Flipin good, or a total flop?

by GrandFather (Cardinal)
on Jan 25, 2006 at 09:44 UTC ( #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
Node Status?
node history
Node Type: perltutorial [id://525392]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-09-20 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (155 votes), past polls