Log error

2008-05-12 Thread Irfan.Sayed
Hi All, I have written once Perl script to perform certain task. In that script I have defined one function to create the log file. The issue is that whenever I am running that script it is executing fine but the moment it reaches to log () function it throws me following error. Can't t

Re: want to assign default value to variable I assign from split but want to know optimal way to get this done: please help!

2008-05-12 Thread Jenda Krynicky
From: Richard Lee <[EMAIL PROTECTED]> > while () { > my($file1,$file2,$file3,$file4,$file5,$file6,$file10,$file25,$file27) > = (split( /\|/, $_))[3,4,6,7,12,40,41,42,43,46,56,64] > } > > while doing above, what is the easiest way to make sure all the variable > that's being given a

want to assign default value to variable I assign from split but want to know optimal way to get this done: please help!

2008-05-12 Thread Richard Lee
while () { my($file1,$file2,$file3,$file4,$file5,$file6,$file10,$file25,$file27) = (split( /\|/, $_))[3,4,6,7,12,40,41,42,43,46,56,64] } while doing above, what is the easiest way to make sure all the variable that's being given a value is true and if not assign something default

Re: Date::Manip

2008-05-12 Thread reader
Rob Dixon <[EMAIL PROTECTED]> writes: >> What is the right syntax? > > print $date = ParseDate("epoch 1210628919") . "\n"; Egad, and there is a big NOTE in perldoc Date::Manip about that very thing... thanks for you patience For anyone finding these posts with a search: (From perldoc Date::M

Re: Date::Manip

2008-05-12 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > Can soneone show me how to convert unix time to something else using > Date:: Manip? > > AFter looking at the Docs in perldoc Date::Manip I thought maybe (from > the examples) something like script below would work. The first two > (now commented) worked as expected bu

Date::Manip

2008-05-12 Thread reader
Can soneone show me how to convert unix time to something else using Date:: Manip? AFter looking at the Docs in perldoc Date::Manip I thought maybe (from the examples) something like script below would work. The first two (now commented) worked as expected but the one with unix date produces a b

Re: Can't run PERL scripts on a shared server?

2008-05-12 Thread Randal L. Schwartz
> ""J" == "J Peng" <[EMAIL PROTECTED]> writes: "J> But most providers disabled mod_perl, b/c it's so powerful that has "J> the ability to harm the webservers. Not so much "harm" as just "the security model presumes a single user across all of the possible code". -- Randal L. Schwartz - Sto

Re: database Cgi query's

2008-05-12 Thread Yitzchok Good
CGI http://search.cpan.org/~lds/CGI.pm-3.37/CGI.pm DBD::mysql http://search.cpan.org/~capttofu/DBD-mysql-4.007/lib/DBD/mysql.pm DBD::DB2 http://search.cpan.org/~ibmtordb2/DBD-DB2-1.1/DB2.pod DBD::SQLite http://search.cpan.org/~msergeant/DBD-SQLite-1.14/lib/DBD/SQLite.pm -- To unsubscribe, e-ma

Re: log missing images

2008-05-12 Thread Gunnar Hjalmarsson
[ Please don't top-post! ] Hildreth, Steve wrote: Gunnar Hjalmarsson wrote: Hildreth, Steve wrote: What I am looking for is a parameter that I can add to my PERL script that will specify the file call that resulted in the log entry. How about showing us the Perl (not PERL) script you have so

dns error or socket setting make perl module fail?

2008-05-12 Thread John Wilson
I tried this on Friday afternoon - thought I'd try again... I keep running into a brick wall when installing the perl module IO::Socket::SSL. During the install, I get an error message that makes the install fail. The message happens when cpan is running external tests, so it seems like there

RE: log missing images

2008-05-12 Thread Hildreth, Steve
Of course, here it is...very simple. #!/usr/local/bin/perl # This script is used to log the referring URL in the event that a link on an LAUSD is invalid #Append referring URL to log file open(LIST,">>/www-logs/error_file.txt"); #Capture referring URL $_ = $ENV{'HTTP_REFERER'}; #Determine if o

Re: log missing images

2008-05-12 Thread Gunnar Hjalmarsson
Hildreth, Steve wrote: What I am looking for is a parameter that I can add to my PERL script that will specify the file call that resulted in the log entry. How about showing us the Perl (not PERL) script you have so far? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl --

log missing images

2008-05-12 Thread Hildreth, Steve
I am in the process of logging referring URLs that result in end users being directed to a 4xx error page. What I have noticed is that other items such as a missing CSS, a reference to a non-existing image, etc. that does not necessarily result in the user seeing the 4xx page is still makes an ent

Re: File opening problem

2008-05-12 Thread John W. Krahn
Tatiana Lloret Iglesias wrote: Hi all! Hello, i'm running the following dummy program which just opens a file and I get an error (die message) #!/usr/bin/perl if ( @ARGV[0] eq '' ) @ARGV[0] is an array slice (a list) and it makes no sense to compare a list to a string. It looks like

database Cgi query's

2008-05-12 Thread Pat Rice
lHi All ooking to done some work whit CGI forms in perl, primarily connecting to a database and inserting, deleting and showing values in a database, While looking not to reinvent the wheel, whats out there that I can easily use that would do this for me ? looking at the CGI module... but I think

Re: comparing two binary numbers

2008-05-12 Thread Dr.Ruud
"John W. Krahn" schreef: > Johnson Lau: >> I need to compare two binary numbers and need perl to return the >> number of matching bits. For example: >> $aaa = "1000"; >> $bbb = "00101100"; > > Those aren't binary numbers, they are strings. I don't mind reading "binary number" as "some

Re: File opening problem

2008-05-12 Thread Chas. Owens
On May 12, 2008, at 09:05, Tatiana Lloret Iglesias wrote: Hi all! i'm running the following dummy program which just opens a file and I get an error (die message) #!/usr/bin/perl if ( @ARGV[0] eq '' ) { print "\nUSAGE:\n\t genenames.pl genes.txt \n\n"; exit; } my $file = $ARGV[0];

File opening problem

2008-05-12 Thread Tatiana Lloret Iglesias
Hi all! i'm running the following dummy program which just opens a file and I get an error (die message) #!/usr/bin/perl if ( @ARGV[0] eq '' ) { print "\nUSAGE:\n\t genenames.pl genes.txt \n\n"; exit; } my $file = $ARGV[0]; open(FICH,"$file") or die "cannot open $file"; I've tried t

Re: comparing two binary numbers

2008-05-12 Thread John W. Krahn
Johnson Lau wrote: Dear all, Hello, I need to compare two binary numbers and need perl to return the number of matching bits. For example: $aaa = "1000"; $bbb = "00101100"; Those aren't binary numbers, they are strings. perldoc perlnumber In this case, the number of matching bits i