This works and does what I want it to:
perl -e '@x = split(\\., a.b.c); print $x[0];'
Why does not this work?
perl -e 'print @{split(\\., a.b.c)}[0];'
Is there a compact way to take a slice of a split (or other function that
returns an array) without creating a temporary variable?
Thanks,
On Thu, 23 Sep 2004 13:43:08 -0600, Siegfried Heintze
[EMAIL PROTECTED] wrote:
This works and does what I want it to:
perl -e '@x = split(\\., a.b.c); print $x[0];'
Why does not this work?
perl -e 'print @{split(\\., a.b.c)}[0];'
Because split doesn't return an array reference, it
From: Siegfried Heintze [EMAIL PROTECTED]
This works and does what I want it to:
perl -e '@x = split(\\., a.b.c); print $x[0];'
Why does not this work?
perl -e 'print @{split(\\., a.b.c)}[0];'
Is there a compact way to take a slice of a split (or other function
that returns an array)
This works and does what I want it to:
perl -e '@x = split(\\., a.b.c); print $x[0];'
Why does not this work?
perl -e 'print @{split(\\., a.b.c)}[0];'
Is there a compact way to take a slice of a split (or other function that
returns an array) without creating a temporary variable?
From: Wiggins d Anconia [EMAIL PROTECTED]
This works and does what I want it to:
perl -e '@x = split(\\., a.b.c); print $x[0];'
Why does not this work?
perl -e 'print @{split(\\., a.b.c)}[0];'
Is there a compact way to take a slice of a split (or other function
that returns