Re: qr + shift

2007-08-15 Thread Paul Lalli
On Aug 14, 3:57 pm, [EMAIL PROTECTED] (Jay Savage) wrote: > On 8/12/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > > > John W. Krahn wrote: > > > yitzle wrote: > > >> Works: > > >> my $t = shift; > > >> my $id = qr($t); &

Re: qr + shift

2007-08-14 Thread Jay Savage
On 8/12/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > John W. Krahn wrote: > > yitzle wrote: > >> Works: > >> my $t = shift; > >> my $id = qr($t); > >> Doesn't work: > >> my $id = qr(shift); > >> > >

Re: qr + shift

2007-08-12 Thread Paul Lalli
On Aug 12, 12:55 am, [EMAIL PROTECTED] (Yitzle) wrote: > Works: > my $t = shift; > my $id = qr($t); > Doesn't work: > my $id = qr(shift); > > Why? Variables interpolate. Function calls don't. Paul Lalli -- To unsubscribe, e-mail: [

Re: qr + shift

2007-08-12 Thread Mr. Shawn H. Corey
John W. Krahn wrote: yitzle wrote: Works: my $t = shift; my $id = qr($t); Doesn't work: my $id = qr(shift); Why? perldoc -q "How do I expand function calls in a string" It's because qr is not a function, it's a quote-like operator. Also see `perld

Re: qr + shift

2007-08-12 Thread John W. Krahn
yitzle wrote: Works: my $t = shift; my $id = qr($t); Doesn't work: my $id = qr(shift); Why? perldoc -q "How do I expand function calls in a string" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts

Re: qr + shift

2007-08-11 Thread yaron
Hi, my $id = qr(shift); will not work from the same reason that my $id = "shift" will not work!!! Yours, Yaron Kahanovitch - Original Message - From: "yitzle" <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Sunday, August 12, 2007 7:55:38 AM (GMT+0200)

qr + shift

2007-08-11 Thread yitzle
Works: my $t = shift; my $id = qr($t); Doesn't work: my $id = qr(shift); Why? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/