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);
&
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);
> >>
> >
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: [
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
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
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)
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/