-- Forwarded message --
From: Robert Citek <[EMAIL PROTECTED]>
Date: Jan 8, 2008 3:39 PM
Subject: Re: avoid using a temporary variable
To: "John W. Krahn" <[EMAIL PROTECTED]>
On Jan 8, 2008 3:09 PM, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Joh
On Jan 8, 2008 2:33 PM, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Robert Citek wrote:
> > $ ls | perl -e 'print "('\''" . join("'\'','\''", map { chomp; $_ }
> > (<>) ) . "'\'') \n" ; '
>
> $ ls | perl -le 'print "(", join ",", map( { chomp; "\047$_\047" } <> ),
> ")"'
Nice example of putting the
John W. Krahn wrote:
John W. Krahn wrote:
Robert Citek wrote:
On Jan 8, 2008 9:40 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
On Jan 8, 2008 9:24 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
What I really want to know is if there's a way to eliminate the
temporary variable. If not, that's fin
John W. Krahn wrote:
Robert Citek wrote:
On Jan 8, 2008 9:40 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
On Jan 8, 2008 9:24 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
What I really want to know is if there's a way to eliminate the
temporary variable. If not, that's fine. I was just wonderi
Robert Citek wrote:
On Jan 8, 2008 9:40 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
On Jan 8, 2008 9:24 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
What I really want to know is if there's a way to eliminate the
temporary variable. If not, that's fine. I was just wondering if
there's somethin
Robert Citek wrote:
How can I get rid of the @foo?
This does what I want, but uses the "temporary" variable @foo:
$ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
This eliminates the temporary variable but doesn't work:
$ ls | perl -e 'print join(" ", chomp(<>))'
$ ls | perl -l4
On Tue, Jan 08, 2008 at 08:07:02AM -0800, Paul Lalli wrote:
> On Jan 7, 6:59 pm, [EMAIL PROTECTED] (Robert Citek) wrote:
> > How can I get rid of the @foo?
> >
> > This does what I want, but uses the "temporary" variable @foo:
> >
> > $ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
> >
On Jan 8, 2008 11:14 AM, Tom Phoenix <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 7:38 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
> > What I really want to know is if there's a way to eliminate the
> > temporary variable.
>
> Are temporary variables quite expensive in your country?
>
> Cheers!
You
On Jan 8, 2008 9:40 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 9:24 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
> > What I really want to know is if there's a way to eliminate the
> > temporary variable. If not, that's fine. I was just wondering if
> > there's something I'm over
On Jan 8, 2008 7:38 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
> What I really want to know is if there's a way to eliminate the
> temporary variable.
Are temporary variables quite expensive in your country?
Cheers!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PRO
On Jan 7, 6:59 pm, [EMAIL PROTECTED] (Robert Citek) wrote:
> How can I get rid of the @foo?
>
> This does what I want, but uses the "temporary" variable @foo:
>
> $ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
>
> This eliminates the temporary variable but doesn't work:
>
> $ ls | per
On Jan 8, 2008 9:24 AM, Robert Citek <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 8:59 AM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> > On Jan 7, 2008 6:59 PM, Robert Citek <[EMAIL PROTECTED]> wrote:
> > > How can I get rid of the @foo?
> > >
> > > This does what I want, but uses the "temporary" varia
-- Forwarded message --
From: Robert Citek <[EMAIL PROTECTED]>
Date: Jan 8, 2008 9:24 AM
Subject: Re: avoid using a temporary variable
To: "Chas. Owens" <[EMAIL PROTECTED]>
On Jan 8, 2008 8:59 AM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> On Ja
On 0:59:22 08/01/2008 "Robert Citek" <[EMAIL PROTECTED]> wrote:
> How can I get rid of the @foo?
> $ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
hi!
ls | perl -pe 's/\n\ /'
perldoc perlrun:
-p causes Perl to assume the following loop around your program,
whic
On Jan 7, 2008 6:59 PM, Robert Citek <[EMAIL PROTECTED]> wrote:
> How can I get rid of the @foo?
>
> This does what I want, but uses the "temporary" variable @foo:
>
> $ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
>
> This eliminates the temporary variable but doesn't work:
>
> $ ls
How can I get rid of the @foo?
This does what I want, but uses the "temporary" variable @foo:
$ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
This eliminates the temporary variable but doesn't work:
$ ls | perl -e 'print join(" ", chomp(<>))'
Thanks in advance.
Regards,
- Robert
16 matches
Mail list logo