Re: Perl loops should use break, not last
From: Jeremy Morton (ask_at_me.com)
Date: 01/31/05
- Next message: Sherm Pendley: "Re: Perl loops should use break, not last"
- Previous message: perl_beginner: "Perl help for Menue driver interface"
- In reply to: Abigail: "Re: Perl loops should use break, not last"
- Next in thread: Sherm Pendley: "Re: Perl loops should use break, not last"
- Reply: Sherm Pendley: "Re: Perl loops should use break, not last"
- Reply: Big and Blue: "Re: Perl loops should use break, not last"
- Reply: Abigail: "Re: Perl loops should use break, not last"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 31 Jan 2005 00:14:21 -0000
"Abigail" <abigail@abigail.nl> wrote in message
news:slrncvqo37.a9.abigail@alexandra.abigail.nl...
> Jeremy Morton (ask@me.com) wrote on MMMMCLXX September MCMXCIII in
> <URL:news:41fd39a4$0$26027$fa0fcedb@news.zen.co.uk>:
> %%
> %% > One of the reasons 'last' isn't called 'break' is that 'last' isn't
> %% > the same as 'break'. 'break' breaks the current loop - while 'last'
> %% > takes an optional argument, indicating the top level loop that will
> %% > be exited.
> %%
> %% Hang on, are you saying 'break' has a meaning in Perl?
>
> No, I did not.
>
The what did you mean when you said 'last' isn't the same as break? AFAICT,
Perl's 'last' is identical to C and other languages's 'break', assuming that
break can take an optional argument specifying which level of block to break
out of (which often, it can).
-- Best regards, Jeremy Morton (Jez)
- Next message: Sherm Pendley: "Re: Perl loops should use break, not last"
- Previous message: perl_beginner: "Perl help for Menue driver interface"
- In reply to: Abigail: "Re: Perl loops should use break, not last"
- Next in thread: Sherm Pendley: "Re: Perl loops should use break, not last"
- Reply: Sherm Pendley: "Re: Perl loops should use break, not last"
- Reply: Big and Blue: "Re: Perl loops should use break, not last"
- Reply: Abigail: "Re: Perl loops should use break, not last"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]