Re: Aliasing functions

2009-04-22 Thread Jenda Krynicky
From: "Chas. Owens" > On Tue, Apr 21, 2009 at 21:15, John W. Krahn wrote: > > Kelly Jones wrote: > >> > >> I want foo() and bar() to do the same thing. One way to do this: > >> > >> sub foo {return bar(@_);} > >> > >> Is there a more clever way using \&bar and things like that? > > > > $ perl -le

Re: Aliasing functions

2009-04-21 Thread Chas. Owens
On Tue, Apr 21, 2009 at 21:15, John W. Krahn wrote: > Kelly Jones wrote: >> >> I want foo() and bar() to do the same thing. One way to do this: >> >> sub foo {return bar(@_);} >> >> Is there a more clever way using \&bar and things like that? > > $ perl -le' > use warnings; > use strict; > > sub b

Re: Aliasing functions

2009-04-21 Thread John W. Krahn
Kelly Jones wrote: I want foo() and bar() to do the same thing. One way to do this: sub foo {return bar(@_);} Is there a more clever way using \&bar and things like that? $ perl -le' use warnings; use strict; sub bar { print "in sub bar: @_" } bar 1, 2, 3; sub foo { goto &bar } foo 4, 5,

Aliasing functions

2009-04-21 Thread Kelly Jones
I want foo() and bar() to do the same thing. One way to do this: sub foo {return bar(@_);} Is there a more clever way using \&bar and things like that? -- We're just a Bunch Of Regular Guys, a collective group that's trying to understand and assimilate technology. We feel that resistance to new