Is it possible to calculate the File SIZE which is from HTTP. i.e if I
wanted to know
file size of http://www.yahoo.com/images/a.gif from PERL..
Thanks
Anish
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/471 - Release
hi,
i need to parse the content on a page (which are basically headers ) and
verify certain content is returned or not by my server . i am using IE
automation i tried using
Content();
VerifyText($string, [iflags])..but getting Undefined subroutine
main::Content called at main.pl line 35. this
Vishwanath Chitnis wrote:
: is there any other way other than above mentioned to do this?
How can we possibly tell with only those lines?
Show more code. Something we can run that will illustrate
your problem.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
Free Market Advocate
Anish Kumar K. [EMAIL PROTECTED] asked:
Is it possible to calculate the File SIZE which is from HTTP.
i.e if I wanted to know
file size of http://www.yahoo.com/images/a.gif from PERL..
Send a HEAD request for the URI and look at the
Content-Length header of the response object:
From the $ENV{CONTENT_LENGTH}
-Original Message-
From: Anish Kumar K. [EMAIL PROTECTED]
Sent: Oct 11, 2006 2:17 AM
To: beginners@perl.org
Subject: getting the File size of image URL
Is it possible to calculate the File SIZE which is from HTTP. i.e if I
wanted to know
file size of
Rob Dixon schreef:
open my $fh, $file or die open '$file': $!;
OP had
open my $fh, '', $file or die open '$file': $!
which I consider as better.
@data[0..6] = split /,/;
Nice idiom.
--
Affijn, Ruud
Gewoon is een tijger.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Kathryn Bushley schreef:
#!/usr/bin/perl -w
use warnings;
Make that:
#!/usr/bin/perl
use warnings ;
use strict ;
See `perldoc perllexwarn`.
--
Affijn, Ruud
Gewoon is een tijger.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dear All,
My Code is to ping a range of IP reading from a text file and if they are
not reachable then just write the IP's to a file. Regarding permissions i
am running the same script using root previliges and i am able to run the
script maually but it is failing if i write the script in cron
The Answers are
1. Is /scripts/.pl the full path name?
Yes the above is the correct path of the script : when i run perl
/scripts/xxx.pl it runs fine
2. Does your script have execute permissions
Yes it has execute permissions (i changed it chmod +x for the code file)
3. Does the shebang line
On Wed, Oct 11, 2006 at 03:03:12PM +0400, Mazhar wrote:
Dear All,
My Code is to ping a range of IP reading from a text file and if they are
not reachable then just write the IP's to a file. Regarding permissions i
am running the same script using root previliges and i am able to run the
I have set the Shebang in my code to the below
#!/usr/bin/perl
and below is top of my code below,
---
#!/usr/bin/perl
use strict;
use warnings;
use Net::Ping;
my $file_name='hostnames.txt';
my $line;
my
This is the last top-posted email from you that I will answer..
Please learn how to quote properly!
On Wednesday 11 October 2006 13:14, Mazhar wrote:
1. Is /scripts/.pl the full path name?
Yes the above is the correct path of the script : when i run perl
/scripts/xxx.pl it runs fine
So
Mazhar [EMAIL PROTECTED] wrote:
My Code is to ping a range of IP reading from a text file and
if they are not reachable then just write the IP's to a
file. Regarding permissions i am running the same script
using root previliges and i am able to run the script maually
but it is failing
Sorry Solli,
Below is the output what u asked for,
1. If i run the code /scripts/xxx.pl i get the below error...
interpreter /usr/bin/perl not found
sh: /scripts/xxx.pl: not found.
2. The first line in the code is below (i have added the Shepang Value)
#!/usr/bin/perl
I did not get
Dear Thomas,
I am running PING from the package Net, can u tell me where can i find the
logs of cron jobs as because with that i will be able to check the
possibility of not running the script, please
Regards
Mazhar
On 10/11/06, Thomas Bätzler [EMAIL PROTECTED] wrote:
Mazhar [EMAIL
ok, here is the code:
$webserver=apache1;
$platform=solaris;
$uname=abc123;
$password=abc123;
my $ie = Win32::IEAutomation-new(visible=1,maximized=1);
if ($webserver == apache1 $platform == solaris){
$ie-gotoURL('http://xyz.test.com:8900/_cqr/test.cgi');
}
$ie-getTextBox(name:,
On Wednesday 11 October 2006 13:35, Mazhar wrote:
I did not get the meaning of (Quote properly)
http://www.xs4all.nl/~hanb/documents/quotingguide.html
When it ways usenet, think email-lists too.
--
Bjørge Solli - Office:+47 55205847
Mohn-Sverdrupsenteret, Nansensenteret,
On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote:
1. If i run the code /scripts/xxx.pl i get the below error...
interpreter /usr/bin/perl not found
sh: /scripts/xxx.pl: not found.
So it would appear that this is not where perl is found on your system.
You need to put the
On 10/11/06, Paul Johnson [EMAIL PROTECTED] wrote:
On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote:
1. If i run the code /scripts/xxx.pl i get the below error...
interpreter /usr/bin/perl not found
sh: /scripts/xxx.pl: not found.
So it would appear that this is not where
On Wed, Oct 11, 2006 at 04:18:04PM +0400, Mazhar wrote:
On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote:
1. If i run the code /scripts/xxx.pl i get the below error...
interpreter /usr/bin/perl not found
sh: /scripts/xxx.pl: not found.
i have added /usr/bin/perl in my
On 10/11/06, Paul Johnson [EMAIL PROTECTED] wrote:
On Wed, Oct 11, 2006 at 04:18:04PM +0400, Mazhar wrote:
On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote:
1. If i run the code /scripts/xxx.pl i get the below error...
interpreter /usr/bin/perl not found
sh:
On Wed, 2006-10-11 at 16:45 +0400, Mazhar wrote:
I have created the file in Windows and have pasted the entries in HP-UNIX (i
mean copied). I cannot find the command dos2unix in HP UX.
easy check, change command line to this:
#!/usr/bin/perl -w
to strip the carriage returns try something
Am not shure if this is the right list. I installed perl
into an unusual directory but new modules, like XML-Parser, weren't
able to find installed modules, like ExtUtils. Though the @INC output in
the error message was fully correct. I installed perl into /usr and it
just worked for so.
Can
On 10/11/06, Ken Foskey [EMAIL PROTECTED] wrote:
On Wed, 2006-10-11 at 16:45 +0400, Mazhar wrote:
I have created the file in Windows and have pasted the entries in
HP-UNIX (i
mean copied). I cannot find the command dos2unix in HP UX.
easy check, change command line to this:
Vishwanath Chitnis wrote:
ok, here is the code:
$webserver=apache1;
$platform=solaris;
$uname=abc123;
$password=abc123;
Missed the quotes ??
$webserver = apache1 ;
my $ie = Win32::IEAutomation-new(visible=1,maximized=1);
if ($webserver == apache1 $platform == solaris){
if (
On 11 Oct 2006 at 17:14, Mazhar wrote:
From the help above i created a new perl code and i was successfull in
running the code by typing the command /scripts/newxxx.pl but the same is
not executed by cron i have the cron entry as below
10 * * * * /scripts/newxxx.pl
This as to be the
Can somebody give me a hint if there's some general problem with perl
when not resided in /usr
Hello,
Do you know where your modules are installed?Given the path for installed
modules is /your/path,you can add the path to Perl's @INC by putthing this
statement at the begin of your scripts:
On Wed, 11 Oct 2006 21:39:22 +0800 (GMT+08:00)
Jeff Pang [EMAIL PROTECTED] wrote:
Can somebody give me a hint if there's some general problem with perl
when not resided in /usr
Hello,
Do you know where your modules are installed?Given the path for installed
modules is /your/path,you
How do you create your websites' RSS feeds?
I run a script called createrss.pl as a cron job every hour which checks
if there are any new stories and if so creates a new feed.rss file
I think this method takes up a lot of RAM and CPU power since it
launches Perl every hour, but I can't think
On 10/11/06, Beginner [EMAIL PROTECTED] wrote:
On 11 Oct 2006 at 17:14, Mazhar wrote: From the help above i created a new perl code and i was successfull in
running the code by typing the command /scripts/newxxx.pl but the same is not executed by cron i have the cron entry as below10 * * * *
Hello everybody
I would like to know if there is any module which can display in a
enjoyable way the content of an array with about 200 values.
Could Data::Dumper be a solution for my problem?
Any help or example will be very appreciated.
Thanks in advance.
--
To unsubscribe, e-mail: [EMAIL
Hi Sami,
Yes Data::Dumper is your friend when it comes to dumping data (how strange
is that :-)
Simply do this in your perl script:
*use Data::Dumper;*
*print Dumper @huge_array;*
And be amazed ;-)
On 10/11/06, Sami FANTAR [EMAIL PROTECTED] wrote:
Hello everybody
I would like to know
Rob Coops a écrit :
Hi Sami,
Yes Data::Dumper is your friend when it comes to dumping data (how
strange
is that :-)
Simply do this in your perl script:
*use Data::Dumper;*
*print Dumper @huge_array;*
And be amazed ;-)
On 10/11/06, Sami FANTAR [EMAIL PROTECTED] wrote:
Hello everybody
Here is what I use for a perl script I use to restart the oracle
listener if it goes down, to set the oracle environment.
00,10,20,30,40,50 * * * * (. $HOME/.bash_profile;
$HOME/hdpjfw_scripts/dbping.pl) $HOME/spool/db_ping.out 21
From: Mazhar
Rob Coops wrote:
: Simply do this in your perl script:
: *use Data::Dumper;*
: *print Dumper @huge_array;*
For the archives:
Those asterisks (*) are for emphasis. They are not
actually in the code. Arrays and hashes can also be
dumped using a reference. I find a reference more
On 10/11/06, Jason Wozniak [EMAIL PROTECTED] wrote:
Here is what I use for a perl script I use to restart the oracle listener
if it goes down, to set the oracle environment.
00,10,20,30,40,50 * * * * (. $HOME/.bash_profile;
$HOME/hdpjfw_scripts/dbping.pl) $HOME/spool/db_ping.out 21
Mazhar,
The cron log is most likely written to /var/log/cron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On 10/11/06, Karjala [EMAIL PROTECTED] wrote:
I run a script called createrss.pl as a cron job every hour which checks
if there are any new stories and if so creates a new feed.rss file
I think this method takes up a lot of RAM and CPU power since it
launches Perl every hour, but I can't think
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,}, map(subt($_),
@a)), \n;
sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print a=$a\n;
return $a;}'
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,},
map(s/^(.*)\..*/$1/, @a)), \n; '
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,},
On 10/11/06, Moon, John [EMAIL PROTECTED] wrote:
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,}, map(subt($_),
@a)), \n;
sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print a=$a\n;
return $a;}'
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,},
map(s/^(.*)\..*/$1/, @a)), \n; '
perl
On 10/11/2006 10:42 AM, Sami FANTAR wrote:
[...]
I have read the Data::Dumper related doc.
Including the part where it tells you how to substitute the correct
variable names for $VAR1,$VAR2,... ?
But, after having written your example, the output seems quite weird.
I got $VAR1,$VAR2, and
On 10/11/06, Moon, John [EMAIL PROTECTED] wrote:
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,}, map(subt($_),
@a)), \n;
sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print a=$a\n;
return $a;}'
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,},
map(s/^(.*)\..*/$1/, @a)), \n; '
i'm getting an error in an installed module, not in my script.
invalid top directory at /System/Library/Perl/5.8.1/File/Find.pm line 568.
script is as follows:
use File::Find;
use Net::FTP;
my $server = blah;
my $login = [EMAIL PROTECTED];
my $pass = blahblah;
my $ftp = Net::FTP-new($server)
On Wed, Oct 11, 2006 at 07:37:36PM -0400, Moon, John wrote:
On 10/11/06, Moon, John [EMAIL PROTECTED] wrote:
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,}, map(subt($_),
@a)), \n;
sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print a=$a\n;
return $a;}'
perl -e
On 10/11/06, Jesse Engel [EMAIL PROTECTED] wrote:
i'm getting an error in an installed module, not in my script.
invalid top directory at /System/Library/Perl/5.8.1/File/Find.pm line 568.
Yes; but do you see what it's trying to tell you? Some top directory
that you're passing to find() isn't
Moon, John wrote:
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,}, map(subt($_),
@a)), \n;
sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print a=$a\n;
return $a;}'
perl -e '@a=(frc.apmt,frc_ff.apmt);print join(q{,},
map(s/^(.*)\..*/$1/, @a)), \n; '
perl -e
On Wed, October 11, 2006 7:03 am, Mazhar wrote:
Dear All,
My Code is to ping a range of IP reading from a text file and if they are
not reachable then just write the IP's to a file. Regarding permissions i
am running the same script using root previliges and i am able to run the
script
47 matches
Mail list logo