Dangerous use of fatarrow, just say no (was Re: What's the different between -> and => ?)

2002-01-27 Thread Randal L. Schwartz
> "Jenda" == Jenda Krynicky <[EMAIL PROTECTED]> writes: Jenda> I think the nicest example is Jenda> use File::Copy; Jenda> copy $source => $destination; [edited slightly] The big problem with using the big arrow there is when you have constants: use constant TEMPLATE => '/usr/lib/tem

Re: Dangerous use of fatarrow, just say no (was Re: What's the different between -> and => ?)

2002-01-27 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (Randal L. Schwartz) > > "Jenda" == Jenda Krynicky <[EMAIL PROTECTED]> writes: > > Jenda> I think the nicest example is > > Jenda>use File::Copy; > Jenda>copy $source => $destination; > [edited slightly] > > The big problem with using the big arrow t

Re: Dangerous use of fatarrow, just say no (was Re: What's the different between -> and => ?)

2002-01-27 Thread Randal L. Schwartz
> "Jenda" == Jenda Krynicky <[EMAIL PROTECTED]> writes: >> So, in general, I actively discourage the use of fatarrow as a funny >> comma, unless that use is to explicitly quote the left argument. Jenda> One has to know the implications. Exactly. So it's one of those trickier things, that w

Re: Dangerous use of fatarrow, just say no (was Re: What's the different between -> and => ?)

2002-01-27 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> > On Jan 27, Jenda Krynicky said: > > >> use constant TEMPLATE => '/usr/lib/templates/foo.html'; > >> use File::Copy; > >> copy TEMPLATE => $destination; > > > >I usualy write constants with the &. So that when I make a

Re: Dangerous use of fatarrow, just say no (was Re: What's the different between -> and => ?)

2002-01-28 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> > Prototypes can be avoided by prepending a & to the function call -- > that's just the way it goes. That way, you can say: > > $avg = &average([]); > > if you really wanted to. I don't condone this, personally. > Now, what a