develooper Front page | perl.perl6.language | Postings from July 2001

what's with 'with'? (was: [aliasing - was:[nice2haveit]])

From:
Garrett Goebel
Date:
July 19, 2001 11:34
Subject:
what's with 'with'? (was: [aliasing - was:[nice2haveit]])
Message ID:
71BEC0D4E1DED3118F7A009027B12028010BDF74@EXCH_MISSION
From: Stuart Rocks [mailto:tlhf_loves@hotmail.com]
> 
> Both the following would work:
> 
> with($foo){
>    print "I am not a $foo\n";
>   # or:
>    print "I am not a ";
>    print;
> }

Okay... I've been mostly ignoring this thread. But can someone reiterate the
difference between the above and

for($foo){
   print "I am not a $foo\n";
  # or:
   print "I am not a ";
   print;
}

???




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About