Bart Lateur <[EMAIL PROTECTED]> wrote:
>If it should be just "fooa", then I'd like to mote that solutions based
>upon this trick would be disqualified, because they won't work on all
>reasonable systems. :-)
perl56delta, aka perldelta for v5.6 & 5.6.1, says (n.b. this line = valid perl)
On Wed, 30 Jan 2002 11:22:11 +0100, [EMAIL PROTECTED] wrote:
>> Isn't glob() supposed to return only files that actually exist?
>
>No. glob() returns the files that exists, but only if there exists
>at least one. Otherwise, it just does the { } expansion, and leaves
>things as is. Just like in *s
-- Original Message --
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Wed, 30 Jan 2002 17:03:45 +0100
>On Wed, Jan 30, 2002 at 04:46:28PM +0100, Joerg Ziefle wrote:
>> -- Original Message --
>> From: [EMAIL
On Wed, Jan 30, 2002 at 04:46:28PM +0100, Joerg Ziefle wrote:
> -- Original Message --
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> Date: Wed, 30 Jan 2002 16:24:20 +0100
>
> >On Wed, Jan 30, 2002 at 03:55:32PM +0100, Joerg Ziefle wrote:
> >>
-- Original Message --
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Wed, 30 Jan 2002 16:24:20 +0100
>On Wed, Jan 30, 2002 at 03:55:32PM +0100, Joerg Ziefle wrote:
>>perl -e 'print "Current time is: @{[scalar localtime]}\n"'
>>
>> Note the
On Wed, Jan 30, 2002 at 03:55:32PM +0100, Joerg Ziefle wrote:
>
> Not to forget scalar evaluation within strings:
>
>"${\()}"
>
> as in:
>
>perl -e 'print "Current time is: ${\(scalar localtime)}\n"'
>
> (the parens could as well have been omitted)
>
> as opposed to the array evaluat
-- Original Message --
From: Peter Makholm <[EMAIL PROTECTED]>
Date: Wed, 30 Jan 2002 11:55:38 +0100
>Stephen Turner <[EMAIL PROTECTED]> writes:
>
>> Would someone be kind enough to get me up to speed on @{[]} ?
>
>Evaluate the expression inside the {} and
On Wed, 30 Jan 2002 11:54:59 +0100 (MET), Philippe 'BooK' Bruhat wrote:
>And it can actually be shorter, sometimes:
> print join a,@a
>vs.
> $"=a;print"@a"
But for this case, I think this will be better to do:
$,=a;print@a
--
Bart.
Stephen Turner <[EMAIL PROTECTED]> writes:
> Would someone be kind enough to get me up to speed on @{[]} ?
Evaluate the expression inside the {} and use it as a reference to an
array.
--
Når folk spørger mig, om jeg er nørd, bliver jeg altid ilde til mode
og svarer lidt undskyldende: "Nej, jeg
En réponse à Stephen Turner <[EMAIL PROTECTED]>:
> On Wed, 30 Jan 2002 [EMAIL PROTECTED] wrote:
> >
> > Bingo! The only thing left was to figure out how to convert that
> > into a string for eval. I could see no better way than the
> > standard @{[]} notation
>
> Would someone be kind enough to
Bart Lateur wrote in fwp:
> Isn't glob() supposed to return only files that actually exist?
No, it's supposed to mimic csh :
$ csh
$ echo foo
foo
$ echo foo*
echo: No match.
$ echo foo{a,b}
fooa foob
(note that it's different from bash globbing in the foo* case).
--
Rafael Garcia-Suarez
On Wed, 30 Jan 2002 [EMAIL PROTECTED] wrote:
>
> Bingo! The only thing left was to figure out how to convert that
> into a string for eval. I could see no better way than the
> standard @{[]} notation
Would someone be kind enough to get me up to speed on @{[]} ?
TIA.
--
Stephen Turner, Cambri
On Wed, 30 Jan 2002 [EMAIL PROTECTED] wrote:
>
> No. glob() returns the files that exists, but only if there exists
> at least one.
>
> csh % echo yy*
> echo: No match
> csh % echo y?y
> echo: No match
> csh % echo y{a,e,i,o,u,y,}y
> yay yey yiy yoy yuy yyy yy
Is
On Wed, Jan 30, 2002 at 10:47:49AM +0100, Bart Lateur wrote:
> On Wed, 30 Jan 2002 14:17:01 +1100, [EMAIL PROTECTED] wrote:
>
> >but then I remembered a post by Perl Monk tilly (something
> >about a color chart) where he used glob in a most perverse way.
> >I had never done this myself, however,
On Wed, 30 Jan 2002 14:17:01 +1100, [EMAIL PROTECTED] wrote:
>but then I remembered a post by Perl Monk tilly (something
>about a color chart) where he used glob in a most perverse way.
>I had never done this myself, however, so I started with a small
>program:
>
>@a = glob('|y|{a,e,i,o,u,y,}||c'
I thought I would describe a little bit of background to the
tournament in case anyone is interested.
Unlike Santa's game, where I simply chose some standard utilities,
like head and tail, without any regard to golfing, this time I
wanted to "cook" an interesting golf hole.
To do that, I had to
16 matches
Mail list logo