in reply to Why does cron kill this script??

I think the error you are getting
is the result of ...

use strict;

somewhere in your script or libs included by your
script. So you need to 'maybe' say ...

my $p = HTML::...

Why this error manifest itself when executed
from cron is probably do to the environment
cron runs in vs. your command line env.
... as others have pointed out

--
Its like a dog that can sing and dance.
It's remarkable because it can do it.
Not that it can do it well.

Replies are listed 'Best First'.
(jeffa) 2Re: Why does cron kill this script??
by jeffa (Bishop) on Jan 07, 2002 at 06:51 UTC
    Actually, it is the result of a non-existing file:
    use strict; use HTML::TokeParser; my $p = HTML::TokeParser->new(shift); my $token = $p->get_tag("a"); [jeffa@trinity perl]$ ./bar.pl asdfsdaf Can't call method "get_tag" on an undefined value at ./bar.pl line 7.
    Not declaring $p with my yields:
    Global symbol "$p" requires explicit package name ...
    So i'd put my money on the bet that strict is not being used or $p was declared earlier. More likely getting home paths mixed up.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    F--F--F--F--F--F--F--F--
    (the triplet paradiddle)