Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Re: Crontab error!

by Ozoz (Initiate)
on Apr 04, 2001 at 14:30 UTC ( #69608=note: print w/replies, xml ) Need Help??

in reply to Re: Crontab error!
in thread Crontab error!

Here's the script. Thx! :)
#!/usr/bin/perl # Environment Variables use LWP::Simple; use CGI qw/:standard :netscape :html3/; $sonuc="/home/usr254/html/sa/filmler/HeadLine.tlt"; &toplasa1; exit; sub toplasa1 { $elle1= get(""); # Oncesini sil $elle1=~ s/^.*<!---Insert_Tertiary_Stories--->//s; # Sonrasini sil $elle1=~ s/<!---END Insert_Tertiary_Stories--->.*$//s; # Gereksiz bosluklari kaldir $elle1=~ s/\s\s//g; # Enterlari kaldir $elle1=~ s/\n//g; # Returnleri tanimla $elle1=~ s/<TD WIDTH=13 VALIGN="TOP">/\n/g; $elle1=~ s/<!---spacing between headlines--->/\n\n/g; $elle1=~ s/&#0145;/'/g; $elle1=~ s/&#0146;/'/g; $elle1=~ s/&#0147;/"/g; $elle1=~ s/&#0148;/"/g; # Butun tablari kaldir $elle1=~ s/<[^>]+>//g; # Baaas open(PAGE,">$sonuc") || die("Error $! opening file"); print PAGE $elle1; close(PAGE); }

Replies are listed 'Best First'.
Re: Re: Re: Crontab error!
by davorg (Chancellor) on Apr 04, 2001 at 14:45 UTC

    Both LWP::Simple and CGI try to export a function called head and they have different prototypes. This can lead to badness - as you've seen.

    However, you don't actually use either of these subroutines, so you just need to stop importing them (or, at least, one of them). Quickest fix is to change the use LWP::Simple line to:

    use LWP::Simple 'get';

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      Or change   use CGI qw/:standard :netscape :html3/; to   #use CGI qw/:standard :netscape :html3/; or remove that line entirely, since the script doesn't really use anything from

      Thanks Dave! Though I still receieve an email, it's empty; just informing that the cronjob is done I think. No errors. thx :)
      500 error.log for the script:
      /home/usr254/html/sa/Global symbol "$sonuc" requires explicit package +name at ok-filmler.cgi line 8. Global symbol "$elle1" requires explicit package name at +i line 15.

        You'll need to predeclare both of these variables. This is a good thing and one of the best reasons for using use strict.

        my $sonuc="/home/usr254/html/sa/filmler/HeadLine.tlt"; my $elle1= get("");

        "Perl makes the fun jobs fun
        and the boring jobs bearable" - me

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://69608]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2023-02-07 07:39 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (38 votes). Check out past polls.