
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Perl lists
- Date: Fri, 09 Aug 2002 14:36:55 +0800
- From: "Shimpei Yamashita" <shimpei@example.com>
- Subject: Re: [tlug] Perl lists
On 8/9/2002, "Brett Robson" <brett@example.com> wrote:
>Got a quick question.
>
>Does anyone know a fast/easy way to append a fix value to each item in a
>list?
>
>eg I have a list of domains in @example.com and I want to put *. on the left
of
>each one. I'm currently uses a foreach.
I doubt you can get much faster or easier than for or foreach. But for
brevity, try
@example.com = map { "*.$_" } @example.com;
Shimpei.
Home |
Main Index |
Thread Index