Re: While query
From: Abigail (abigail_at_abigail.nl)
Date: 10/01/04
- Next message: Abigail: "Re: making easy things difficult: @a-@b"
- Previous message: Abigail: "Re: While query"
- In reply to: Keith Keller: "Re: While query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 01 Oct 2004 21:39:40 GMT
Keith Keller (kkeller-usenet@wombat.san-francisco.ca.us) wrote on
MMMMXLIX September MCMXCIII in <URL:news:99m032x5ic.ln2@goaway.wombat.san-francisco.ca.us>:
|| -----BEGIN PGP SIGNED MESSAGE-----
|| Hash: SHA1
||
|| On 2004-10-01, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
|| >
|| > use strict;
|| > use warnings;
|| >
|| > my @array=('','2');
|| >
|| > foreach (reverse @array)
|| > {
|| > print "''popped'' [$_]\n";
|| > }
||
|| Oops--this won't actually empty the array as the various pop-based
|| methods will. Depending on what the goal is, that may or may not be an
|| issue. (It does continue to loop if an element is undef, which also may
|| or may not be a concern.)
printf "Popped: %s\n" => pop @array while @array;
Abigail
-- A perl rose: perl -e '@}>-`-,-`-%-'
- Next message: Abigail: "Re: making easy things difficult: @a-@b"
- Previous message: Abigail: "Re: While query"
- In reply to: Keith Keller: "Re: While query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|