On 16 Sep, 19:04, [EMAIL PROTECTED] (Chas Owens) wrote:
On 9/16/07, perllearner [EMAIL PROTECTED] wrote:
On 16 Sep, 03:11, [EMAIL PROTECTED] (Mumia W.)
wrote:
On 09/15/2007 01:17 PM, perllearner wrote:
I am a little stumped as to what is happening, just a few hours ago, I
was
thanks Chas.
regex worked fine in my case. But my question was: how to specifically sift
out a particular line number. Also, while using LWP modules, what type of
data is $content = get($url)? Is it an array? Is there a way to find out
what kind of data a particular variable stores?
thanks
raghu
perllearner wrote:
I am connected via a wireless network, and in internet explorer it is
set to automatically detect settings for the LAN, when you say tell
perl what that proxy is, how would I go about doing this? first
finding the proxy, and the code to place it in my perl scripts
hi,
I'm
I am having a look at cpanel v3 code for using a perl module after
installing it in your user directory (when not root):
my $homedir = (getpwuid($))[7];my $n_inc = scalar @INC;for (my $i =
0; $i $n_inc; $i++ ) { if (-d $homedir . '/perl' . $INC[$i])
{ unshift(@INC,$homedir . '/perl'
2007/9/17, W. Sp. [EMAIL PROTECTED]:
Also, while using LWP modules, what type of
data is $content = get($url)? Is it an array? Is there a way to find out
what kind of data a particular variable stores?
It's a scalar.
you can use 'ref' to find out the variable type,like,
$ perl -MLWP::Simple
This is the code that works for me:
my $homedir = (getpwuid($))[7];
my $n_inc = scalar @INC;
for (my $i = 0; $i $n_inc; $i++ ) {
if (-d $homedir . '/perl' . $INC[$i]) {
unshift(@INC,$homedir . '/perl' . $INC[$i]);
$n_inc++;
$i++;
}
}
The reason for it
2007/9/17, perllearner [EMAIL PROTECTED]:
I am having a look at cpanel v3 code for using a perl module after
installing it in your user directory (when not root):
my $homedir = (getpwuid($))[7];my $n_inc = scalar @INC;for (my $i =
0; $i $n_inc; $i++ ) { if (-d $homedir . '/perl' .
I would like to execute the following regex on a file:
s/(\$Revision:\s+)(\d+\.\d+)(\s+\$.+use constant VERSION\s+= )(.+?)
()/$1$2$3Revision $2$5/gs
I am doing this in bash as follows:
REGEX='s/(\$Revision:\s+)(\d+\.\d+)(\s+\$.+use constant VERSION\s+= )
(.+?)()/$1$2$3Revision $2$5/gs'
On 9/16/07, perllearner [EMAIL PROTECTED] wrote:
snip
Do you use a proxy on that network? If you do then you need to tell
Perl what that proxy is.
I am connected via a wireless network, and in internet explorer it is
set to automatically detect settings for the LAN, when you say tell
perl
On 9/16/07, W. Sp. [EMAIL PROTECTED] wrote:
snip
regex worked fine in my case. But my question was: how to specifically sift
out a particular line number.
snip
There is a global variable named $. that stores the current line
number. So you can say things like
perl -ne 'print $. if /this is
On 9/17/07, Jeff Pang [EMAIL PROTECTED] wrote:
2007/9/17, W. Sp. [EMAIL PROTECTED]:
Also, while using LWP modules, what type of
data is $content = get($url)? Is it an array? Is there a way to find out
what kind of data a particular variable stores?
It's a scalar.
you can use 'ref' to
On 9/16/07, Ruprecht Helms [EMAIL PROTECTED] wrote:
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
Especially for me is interessting how to parse the content of the file
and store them into
-Original Message-
From: Chas Owens [mailto:[EMAIL PROTECTED]
Sent: Monday, September 17, 2007 10:14
To: W. Sp.
Cc: beginners@perl.org
Subject: Re: how to make use of $content in LWP
On 9/16/07, W. Sp. [EMAIL PROTECTED] wrote:
snip
regex worked fine in my case. But my question
Chas Owens wrote:
On 9/17/07, Jeff Pang [EMAIL PROTECTED] wrote:
2007/9/17, W. Sp. [EMAIL PROTECTED]:
Also, while using LWP modules, what type of
data is $content = get($url)? Is it an array? Is there a way to find out
what kind of data a particular variable stores?
It's a scalar.
you can
On 9/17/07, Wagner, David --- Senior Programmer Analyst --- WGO
snip
If you want to print a line that is on a given line number you can say
perl -ne 'print if $. = 400' file.txt
$. == 400 and not $. = 400 ( assignment verses equality test ).
Wags ;)
snip
Yeah, I am an idiot.
On 9/17/07, Rob Dixon [EMAIL PROTECTED] wrote:
Chas Owens wrote:
On 9/17/07, Jeff Pang [EMAIL PROTECTED] wrote:
2007/9/17, W. Sp. [EMAIL PROTECTED]:
Also, while using LWP modules, what type of
data is $content = get($url)? Is it an array? Is there a way to find out
what kind of
jrpfinch wrote:
I would like to execute the following regex on a file:
s/(\$Revision:\s+)(\d+\.\d+)(\s+\$.+use constant VERSION\s+= )(.+?)
()/$1$2$3Revision $2$5/gs
I am doing this in bash as follows:
REGEX='s/(\$Revision:\s+)(\d+\.\d+)(\s+\$.+use constant VERSION\s+= )
(.+?)()/$1$2$3Revision
Ruprecht Helms wrote:
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
Especially for me is interessting how to parse the content of the file
and store them into different variables for later
On 9/17/07, Patrik Hasibuan [EMAIL PROTECTED] wrote:
snip
I want to get a content of a URL (like curl does). Which pm can I use?
snip
You probably want LWP::Simple (specifically its get function):
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
my $content = get http://3.am;;
On 9/17/07, Jonathan Lang [EMAIL PROTECTED] wrote:
snip
Most of the replies have suggested using 'split( /\|/, $line )'.
However, this ignores a potentially important aspect of common cvs
file formats - well, important to me, anyway - which is the
interaction between quotes, field delimiters,
Dear my friends...
I want to get a content of a URL (like curl does). Which pm can I use?
I'm facing a development restriction that my perl-code is going to be run on a
webhosting company'es server and I do not have libcurl there so I can not use
libcurl and 'curl binding of perl' in this
On Mon, 2007-09-17 at 13:34 -0700, Jonathan Lang wrote:
Most of the replies have suggested using 'split( /\|/, $line )'.
However, this ignores a potentially important aspect of common cvs
file formats - well, important to me, anyway - which is the
interaction between quotes, field delimiters,
From: Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED]
stat will give me the mod time, but does not have the create
time. From Windows Explorer, I notice that I can get the Create Date.
perldoc -f stat
stat FILEHANDLE
stat EXPR
statReturns a 13-element
From: Patrik Hasibuan [EMAIL PROTECTED]
Dear my friends...
I want to get a content of a URL (like curl does). Which pm can I use?
I'm facing a development restriction that my perl-code is going to be
run on a webhosting company'es server and I do not have libcurl there
so I can not use
I am trying to get my mind around using fork()
I have a text file that has solid, liquid, and gas on it all on new
lines, how I understand fork() is if I wanted to do a print each
statement on each line in the file, fork() could do all at once with
parent and child processes.
I can get around
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]
Sent: Monday, September 17, 2007 15:42
To: beginners@perl.org
Subject: Re: Using Perl Win 32 AS 5.8.x - Anyway to find the
File Create Date/Time
From: Wagner, David --- Senior Programmer Analyst --- WGO
I print some output in PERL. It is data in 3 columns. I use \t to add
a tab space to make a column.
However, \t may not produce the desired result. If the value is short
in length, next column is not aligned correctly in the row. Something
like this:
123 12345 123456
123 12345
-Original Message-
From: VUNETdotUS [mailto:[EMAIL PROTECTED]
Sent: Monday, September 17, 2007 12:36
To: beginners@perl.org
Subject: Format Output
I print some output in PERL. It is data in 3 columns. I use \t to add
a tab space to make a column.
However, \t may not produce the
On 9/17/07, VUNETdotUS [EMAIL PROTECTED] wrote:
I print some output in PERL. It is data in 3 columns. I use \t to add
a tab space to make a column.
However, \t may not produce the desired result. If the value is short
in length, next column is not aligned correctly in the row. Something
like
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
stat will give me the mod time, but does not have the create
time. From Windows Explorer, I notice that I can get the Create Date.
Anyway to accomplish this in Perl? I did a search against CPAN
and also AS, but what I
On 9/17/07, perllearner [EMAIL PROTECTED] wrote:
I am trying to get my mind around using fork()
I have a text file that has solid, liquid, and gas on it all on new
lines, how I understand fork() is if I wanted to do a print each
statement on each line in the file, fork() could do all at once
31 matches
Mail list logo