On Fri, 24 Sep 2004 10:31:36 -0400, Ed Christian <[EMAIL PROTECTED]> wrote:
> Errin Larsen wrote:
> > Hi Perlers,
> >
>
> <snip>
>
> >
> > if( kill 0 => $pid ) {
> >
>
> <snip>
>
> Forgive me if I presume too much, but shouldn't the above be:
>
> if( kill 0, $pid ) {
>
> perldoc -f kill
>
Jenda is correct. I like to think of '=>' as "The FANCY comma!!".
It's just a pretty way of typing a comma for just such an occasion
when you want you code to reflect what you're doing. So, in the
above, I'm sending a signal to $pid, so the big arrow "shows" that the
signal (0) is being sent to that process ($pid)! Perl is Fun!!!
This works great (and is seen most often) in hash declarations:
my %demo_hash = (
Key_One => 1,
Key_Two => 2,
Key_Three => 3
);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>