Re: commify_series script in cookbook page 94
- From: rich.japh@xxxxxxxxx (Richard Lee)
- Date: Sun, 30 Mar 2008 20:36:42 -0400
Dr.Ruud wrote:
Richard Lee schreef:I understood the original but I am not so sure of your solution??
While reading perl cookbook, I came to page 94 and having a hard time
understanding this particular phrase
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
Shortcutting alternative:
my $sepchar = ",";
for (@_) { /,/ and $sepchar = ";" and last }
but (unless @_ is quite big) the grep alternative is likely to be
faster.
Can you write it out completely so that I can try it out?
thanks.
.
- Follow-Ups:
- Re: commify_series script in cookbook page 94
- From: Rob Dixon
- Re: commify_series script in cookbook page 94
- References:
- Interpolate variable in a __DATA__ block
- From: Trudge
- Re: Interpolate variable in a __DATA__ block
- From: Gunnar Hjalmarsson
- Re: Interpolate variable in a __DATA__ block
- From: Trudge
- Re: Interpolate variable in a __DATA__ block
- From: Chas. Owens
- commify_series script in cookbook page 94
- From: Richard Lee
- Re: commify_series script in cookbook page 94
- From: Dr.Ruud
- Interpolate variable in a __DATA__ block
- Prev by Date: Re: commify_series script in cookbook page 94
- Next by Date: Re: Inappropriate ioctl for device
- Previous by thread: Re: commify_series script in cookbook page 94
- Next by thread: Re: commify_series script in cookbook page 94
- Index(es):