Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Select data between a START and END pattern

by bart (Canon)
on May 01, 2003 at 20:21 UTC ( [id://254802]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for ('A' .. 'Z') {
        if(my $counter = ($_ eq 'F' .. $_ eq 'J')) {
            print "$counter: $_\n";
        }
    }
    
  2. or download this
    for ('A' .. 'Z') {
        if((my $first = $_ eq 'F') .. (my $last = $_ eq 'J')) {
            printf "%s first:%s last:%s\n", $_, $first?'yes':'no', $last?'
    +yes':'no', ;
        }
    }
    
  3. or download this
    for (1 .. 8) {
        if((my $first = $_ % 3 == 0) .. (my $last = $_ % 3 == 0)) {
            printf "%s first:%s last:%s\n", $_, $first?'yes':'no', $last?'
    +yes':'no', ;
        }
    }
    
  4. or download this
    for (1 .. 8) {
        if((my $first = $_ % 3 == 0) ... (my $last = $_ % 3 == 0)) {
            printf "%s first:%s last:%s\n", $_, $first?'yes':'no', $last?'
    +yes':'no', ;
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found