perl.beginners
[Top] [All Lists]

Re:Break and resume loop - howto?

Subject: Re:Break and resume loop - howto?
From: pangj@xxxxxxxxxxx (Jeff Pang)
Date: Sun, 31 Aug 2008 14:21:58 +0200 (CEST)
Newsgroups: perl.beginners
You may try something like:

while(<>) {
    chomp;
    if ($_ eq "b") {
        last;
    } elsif ($_ eq "q") {
        exit;
    } elsif ($_ eq "c") {
        next;
    }
}

I thought that this is a homework question,:)

 Créez votre adresse électronique prenom.nom@xxxxxxxxxxx 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
<Prev in Thread] Current Thread [Next in Thread>