On Sun, May 27, 2012 at 07:24:26PM -0700, John W. Krahn wrote:
> Michael Rasmussen wrote:
>> [ a bunch of blather, snipped here ]
>
> The regular expression is not splitting! It is capturing.
> split removes whitespace.
> The regular expression captures non-whitespace.
> So the two expressions pos
Michael Rasmussen wrote:
On Sat, May 26, 2012 at 05:52:19PM +0100, Rob Dixon wrote:
On 26/05/2012 14:07, pa...@fsmail.net wrote:
From: "Rob Dixon"
On 26/05/2012 13:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
That is complete nonsense. Can you show a bench
On Sat, May 26, 2012 at 05:52:19PM +0100, Rob Dixon wrote:
> On 26/05/2012 14:07, pa...@fsmail.net wrote:
>> From: "Rob Dixon"
>>> On 26/05/2012 13:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
>>>
>>> That is complete nonsense. Can you show a benchmark tha
On 2012-05-26 14:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 12-05-27 02:00 AM, Shlomi Fish wrote:
On Sat, 26 May 2012 20:26:14 -0700
Adams Paul wrote:
>
> Sent from my LG phone
>
Why have you already sent 4 messages to this mailing list, which contain nothing
except this "Sent from my LG phone" notice and the entire replied-to message
quoted below
Hi Paul,
On Sat, 26 May 2012 20:26:14 -0700
Adams Paul wrote:
>
> Sent from my LG phone
>
Why have you already sent 4 messages to this mailing list, which contain nothing
except this "Sent from my LG phone" notice and the entire replied-to message
quoted below (with only a plain text part)? I
Sent from my LG phone
Jim Gibson wrote:
>
>On May 26, 2012, at 5:51 AM, pa...@fsmail.net wrote:
>
>> split is slower than the correct regex matching.
>>
>
>Did you know that split uses a regular expression to find the separators on
>which to split the string? So your claim is unlikely to be t
""Christopher Gray"" wrote in message news
Good day,
I have a text file containing records. While I can extract single
sub-strings, I cannot extract multiple sub-strings.
The records are of multiple types - only about a third of which have the
data I need.
An example of a "good" record is
A
Brilliant - a first class "teach-in". Many thanks for the description - it
all works. Brilliant.
-Original Message-
From: Rob Dixon [mailto:rob.di...@gmx.com]
Sent: 26 May 2012 2:13 PM
To: beginners@perl.org
Cc: Christopher Gray
Subject: Re: Help required to extract mul
On 26/05/2012 14:07, pa...@fsmail.net wrote:
From: "Rob Dixon"
On 26/05/2012 13:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
That is complete nonsense. Can you show a benchmark that supports your
claim?
There are many cases prove that, I am just lazy to fin
On May 26, 2012, at 5:51 AM, pa...@fsmail.net wrote:
> split is slower than the correct regex matching.
>
Did you know that split uses a regular expression to find the separators on
which to split the string? So your claim is unlikely to be true. In any case,
the difference between using spli
On 25/05/2012 21:51, Christopher Gray wrote:
Good day,
I have a text file containing records. While I can extract single
sub-strings, I cannot extract multiple sub-strings.
The records are of multiple types - only about a third of which have the
data I need.
An example of a "good" record is
There are many cases prove that, I am just lazy to find one.
You don't know it, so it's nonsense?
Message Received: May 26 2012, 01:58 PM
From: "Rob Dixon"
To: beginners@perl.org
Cc: pa...@fsmail.net
Subject: Re: Help required
On 26/05/2012 13:51, pa...@fsmail.net wrote:
split is slower than the correct regex matching.
That is complete nonsense. Can you show a benchmark that supports your
claim?
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
h
split is slower than the correct regex matching.
Message Received: May 26 2012, 10:59 AM
From: "Dr.Ruud"
To: beginners@perl.org
Cc:
Subject: Re: Help required to extract multiple text fields from a text string
On 2012-05-25 22:51, C
On 2012-05-25 22:51, Christopher Gray wrote:
I have a text file containing records. While I can extract single
sub-strings, I cannot extract multiple sub-strings.
Try split, see perldoc -f split.
while ( my $line= <$fh_in> ) {
my @data= split ' ', $line;
;
}
--
Hi Chris,
On Sat, May 26, 2012 at 8:14 AM, Christopher Gray <
christopher.g...@talktalk.net> wrote:
> Hi,
>
> Thank you for looking to help me. Unfortunately, when I used your code
> nothing was extracted. At least when I printed $1 nothing appeared.
>
> In order to help me learn more about Per
type\s+(\d+)\s+} would extract the number following
"fruittype"
Individually they do - it is just when I add then together in the same line
that I receive nothing. What am I doing wrong?
Chris
-Original Message-
From: pa...@fsmail.net [mailto:pa...@fsmail.net]
Sent: 25 M
Hi Chris,
On Fri, May 25, 2012 at 11:53 PM, wrote:
>
> May you try this matching?
>
> while() {
>next unless /^(\S+\s+)(\S+\s+)(\S+\s+).*\"(.*?)\"/;
>print "$1 $2 $3 $4\n";
> }
>
> HTH.
>
>
> Message Received: May 25 2012, 09:52 PM
> From: "Chri
May you try this matching?
while() {
next unless /^(\S+\s+)(\S+\s+)(\S+\s+).*\"(.*?)\"/;
print "$1 $2 $3 $4\n";
}
HTH.
Message Received: May 25 2012, 09:52 PM
From: "Christopher Gray"
To: beginners@perl.org
Cc:
Subject: Help required to ex
On Oct 23, 2008, at 11:22 AM, Philip Durbin wrote:
monnappa appaiah wrote:
i need help on something i'm working on.I have
127
systems connected in the network, i want to write a script which
will run on
a management server, i shud be able to connect to each and every
s
Chas. Owens wrote:
> On Thu, Oct 23, 2008 at 18:07, Rob Dixon <[EMAIL PROTECTED]> wrote:
>>
>> Microsoft's 'nmake' is available for free, but some versions have been more
>> compatible with standard modules than others, and in any case, as there is
>> still
>> no C compiler, on its own it is a sol
On Thu, Oct 23, 2008 at 18:07, Rob Dixon <[EMAIL PROTECTED]> wrote:
snip
> In their endless search for money, Microsoft don't supply a C compiler,
> assembler, or linker with any version of Windows in the last twenty years or
> so.
> Also, because of several deliberate decisions to make people pay
monnappa appaiah wrote:
>
>i tried to install the "Expect" modulebut i got the below
> error msg:
[snip]
> cpan> install Expect
> Running install for module 'Expect'
[snip]
> Checking if your kit is complete...
> Looks good
> Warning: prerequisite IO::Pty 1.03 not found.
> Warn
On Thu, Oct 23, 2008 at 16:18, monnappa appaiah <[EMAIL PROTECTED]> wrote:
snip
>i tried to install the "Expect" modulebut i got the below
> error msg:
snip
> ERROR: cannot run the configured compiler 'cl'
> (see conf/compilerok.log). Suggestions:
> 1) The complier 'cl' is not in yo
Hi,
i tried to install the "Expect" modulebut i got the below
error msg:
cpan> m /Expect/
Going to read C:\Perl\cpan\Metadata
Database was generated on Mon, 20 Oct 2008 08:27:31 GMT
ModuleBio::MAGE::QuantitationType::ExpectedValue
(JASONS/Bio-MAGE-20020902.6
.tar.gz)
Module
On Thu, Oct 23, 2008 at 10:49, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> i want to run specific commands and the output of those shud be put into a
> file.
snip
So, you will need to learn to use:
Net::SSH (if you want to use keys, this is preferable) -
http://search.cpan.org/dist/Net-SSH/SSH.
monnappa appaiah wrote:
i need help on something i'm working on.I have 127
systems connected in the network, i want to write a script which will run on
a management server, i shud be able to connect to each and every system (all
the systems have same password) and execute ce
i want to run specific commands and the output of those shud be put into a
file.
On Thu, Oct 23, 2008 at 8:13 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 23, 2008 at 10:34, monnappa appaiah <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > i connect to machines using ssh, i need to co
On Thu, Oct 23, 2008 at 10:34, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> Hi,
> i connect to machines using ssh, i need to collect only
> stdout..connecting to all those machines serially or parllely is fine.
>
> Thanks,
> Monnappa
snip
Do you want to run arbitrary commands at any tim
Hi,
i connect to machines using ssh, i need to collect only
stdout..connecting to all those machines serially or parllely is fine.
Thanks,
Monnappa
On Thu, Oct 23, 2008 at 7:50 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 23, 2008 at 09:36, monnappa appaiah <[EMAIL PROTE
On Thu, Oct 23, 2008 at 09:36, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> i need help on something i'm working on.I have 127
> systems connected in the network, i want to write a script which will run on
> a management server, i shud be able to connect to each an
Look at Net::SSH.
On Thu, Oct 23, 2008 at 9:36 AM, monnappa appaiah <[EMAIL PROTECTED]>wrote:
> Hi all,
>
> i need help on something i'm working on.I have 127
> systems connected in the network, i want to write a script which will run
> on
> a management server, i shud be abl
Hello,
use strict;
use warnings;
Excellent use of those :)
my $file_name=".txt";
open(FILE,"$file_name") || die "Not been Accessed";
Good that you checked for failure, why not also report the error ...
Also, don't double quote strings that have nothing to be interpolated or
are
Thanks everybody for the support..
it is working fine..
Regards
Mazhar
On 6/14/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
Mazhar wrote:
> Hello,
Hello,
> I am writing perl on windows installing Activestate Perl and the code is
> reading a text file and processing it,
>
> the code what i
Mazhar wrote:
> Hello,
Hello,
> I am writing perl on windows installing Activestate Perl and the code is
> reading a text file and processing it,
>
> the code what i use is...
>
> ##
> use strict;
> use warnings;
>
> my $file_name=".txt";
>
> open(FILE,
On Wed, 2006-14-06 at 15:59 +0400, Mazhar wrote:
> Hello,
>
> I am writing perl on windows installing Activestate Perl and the code is
> reading a text file and processing it,
>
> the code what i use is...
>
> ##
> use strict;
> use warnings;
>
> my $file_name="X
On 6/14/06, Mazhar <[EMAIL PROTECTED]> wrote:
Hello,
I am writing perl on windows installing Activestate Perl and the code is
reading a text file and processing it,
the code what i use is...
##
use strict;
use warnings;
my $file_name=".txt";
open(FILE
John W. Krahn am Freitag, 7. April 2006 01.09:
> D. Bolliger wrote:
> > btw, @04 is not a valid (array) variable name; they must not start with a
> > digit, as not keyword/builtin does.
>
> $ perl -Mwarnings -Mstrict -le' our @04 = 10 .. 14; print "@04"'
> 10 11 12 13 14
>
> You are probably thinki
D. Bolliger wrote:
>
> btw, @04 is not a valid (array) variable name; they must not start with a
> digit, as not keyword/builtin does.
$ perl -Mwarnings -Mstrict -le' our @04 = 10 .. 14; print "@04"'
10 11 12 13 14
You are probably thinking scalars and/or lexicals.
John
--
use Perl;
program
Mazhar am Donnerstag, 6. April 2006 11.48:
> thanks Raymond for the help it works,
> and what do u mean by variable interpolation
Hello Mazhar
It will help you a lot to know and use the documentation system of perl.
You can get an overview by typing (on the command line):
perldoc perl
(docs)
p
> -Original Message-
> From: Mazhar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 06, 2006 3:19 PM
> To: [EMAIL PROTECTED]
> Cc: beginners@perl.org
> Subject: Re: Help Required on the Script
>
>
> thanks Raymond for the help it works,
> and what do u
gt; > To: Jaime Murillo
> > Cc: beginners@perl.org
> > Subject: Re: Help Required on the Script
> >
> >
> > Thank you giyz for the help i require one more help from
> > yourside. i have
> > one more code where in i am getting error on print of a value
> -Original Message-
> From: Mazhar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 06, 2006 2:41 PM
> To: Jaime Murillo
> Cc: beginners@perl.org
> Subject: Re: Help Required on the Script
>
>
> Thank you giyz for the help i require one more help from
> yo
nks
Swayam
- Original Message -
From: "Mazhar" <[EMAIL PROTECTED]>
To: "Jaime Murillo" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, April 06, 2006 2:41 PM
Subject: Re: Help Required on the Script
Thank you giyz for the help i require one more help from yourside.
Thank you giyz for the help i require one more help from yourside. i have
one more code where in i am getting error on print of a value of a variable,
below is the code
#!/usr/bin/perl -w
use strict;
use warnings;
my $string="[EMAIL PROTECTED]";
print $string;
On executing the above i get the
thanks Jamie.
It is Working.
Regards
Mazhar
On 4/5/06, Jaime Murillo <[EMAIL PROTECTED]> wrote:
>
> On Tuesday 04 April 2006 23:46, Mazhar wrote:
> > Hi Guyz,
>
> Hi Mazhar,
>
> > i am writin a script to automate the command snmpwalk by
> > reading the contents of a file. Below is th
On Tuesday 04 April 2006 23:46, Mazhar wrote:
> Hi Guyz,
Hi Mazhar,
> i am writin a script to automate the command snmpwalk by
> reading the contents of a file. Below is the snippet
>
> $file_name="somefile.txt";
>
> open(FILE,"< $file_name");
>
> while()
> {
> my $ip;
>
> -Original Message-
> From: Mazhar [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 05, 2006 12:16 PM
> To: beginners@perl.org
> Subject: Help Required on the Script
>
>
> Hi Guyz,
> i am writin a script to automate the command
> snmpwalk by reading
> the contents of a fil
> -Original Message-
> From: a b [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 9 February 2006 11:47 PM
> To: libwin32@perl.org; beginners@perl.org
> Subject: help required regarding Win32::OLE
>
>
> Hello all perl gurus,
>
> i'm sticking out with the issue of changing configuration of
Mazhar,
try:
$telnet->waitfor(Match => '/login: $/i');
and
$telnet->waitfor(Match => '/password: $/i');
Vishal,
Right, you want to wait for the device to return something that will match the
expression between the slashes. In that example, you'd be waiting for the
device to return a login prom
Hey Mazhar,
I don't know much about perl, but in the $telnet->waitfor method, what does the
weird parameter mean ('/login: $/i')? I thought that $ means a scalar variable
in perl. What do the forward slashes do here? Some sort of regular expression??
Vishal
Quoting Mazhar <[EMAIL PROTECTED]>:
On Sat, 2004-07-24 at 19:14, NandKishore.Sagi wrote:
> $data_source = "dbi:DriverName:database_name" ;
>
> Can't locate DBD/DriverName.pm in
Change "DriveName" to the name of the driver you want to use (e.g.
mysql)
Change "database_name" to the name of the database you want to use.
--
David
Rob Richardson <[EMAIL PROTECTED]> wrote:
:
: A general thought: Subject lines should tell people what the
: subject of the e-mail is. On many lists and newsgroups
: dedicated to programming languages, many of the most
: knowledgeable people won't bother reading messages with vague
: subjects li
Rob Richardson wrote:
>
> A general thought: Subject lines should tell people what the subject
> of the e-mail is. On many lists and newsgroups dedicated to
> programming languages, many of the most knowledgeable people won't
> bother reading messages with vague subjects like "Help Required". Th
On Fri, 14 Nov 2003 00:17:29 -0600, Andrew Gaffney wrote:
>> In my cgi script I want to open some site let us suppose
>> http://www.google.com
> use CGI;
>
> my $cgi = new CGI;
> print $cgi->header;
> print "location.href = 'http://www.google.com';
>
> There
perldoc CGI
See section : GENERATING A REDIRECTION HEADER
GENERATING A REDIRECTION HEADER
print $query->redirect('http://somewhere.else/in/movie/land');
Sometimes you don't want to produce a document yourself, but simply redirect the
browser elsewhere, perhaps choosing a URL based on the time
Amit Sharma wrote:
Hi,
I have written one cgi script which gets the input from user and
modify one xml file and I got this string as output
http://prv-arweb3.Test.com/Remedy/servlet/Servlet?URL=http://asharma.Test.co
m/Query1.xml&TURL=http://asharma.Test.com/Remedy1.xsl
Here I am getting mo
Anybody?
Rob
Chinku Simon wrote:
>
> > Mohit_jain01 wrote:
> > >
> > > > From: Rob Dixon
> > > >
> > > > Mohit_jain01 wrote:
> > > > >
> > > > > I am facing a problem with text file manipulation with Perl.
> > > > >
> > > > > I have a file with over 2 lac lines of data.
> > > > > I need to find
Hi,
I wud like some help in assembling the kit.
Thanks in Advance
--- Rob Dixon <[EMAIL PROTECTED]> wrote:
> Mohit_jain01 wrote:
> >
> > > From: Rob Dixon
> > >
> > > Mohit_jain01 wrote:
> > > >
> > > > I am facing a problem with text file manipulation with Perl.
> > > >
> > > > I have a file wi
Mohit_jain01 wrote:
>
> > From: Rob Dixon
> >
> > Mohit_jain01 wrote:
> > >
> > > I am facing a problem with text file manipulation with Perl.
> > >
> > > I have a file with over 2 lac lines of data.
> > > I need to find the duplicates(strings) in the file and copy those records into
> > > another
,
Mohit
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Sat 6/14/2003 3:39 AM
To: [EMAIL PROTECTED]
Cc:
Subject: Re: Help required.about string/text manipulation
Mohit_jain01 wrote
Mohit_jain01 wrote:
> Hi,
>
> I am facing a problem with text file manipulation with Perl.
>
> I have a file with over 2 lac lines of data.
> I need to find the duplicates(strings) in the file and copy those records into
> another file.
>
> Is there a function/module in Perl by which I can read t
Brijesh Kanderia wrote:
> Hi All,
>
> I dont have very much idea about perl programing. I have writen a small
> script which reads the content of one file which keeps on changing daily.
> and sends the out put to the concerned person thru mail.
>
> Now what I want is that I dont want the content
Have a look at the MIME::Entity module on http://search.cpan.org/
Use that to build your message, and then one of the mail modules,
or even sendmail to send the message.
On Mon, 2003-03-31 at 16:49, Brijesh Kanderia wrote:
> Hi All,
>
> I dont have very much idea about perl programing. I have
> Just need to know any good docs/web links for Coding
> Standards In PERL. Any pointers are welcome.
Style Guide:
perldoc perlstyle
Writing portable code:
perldoc perlport
Documentation index:
perldoc perl
Jonathan Paton
__
Do You Y
> >my $word = "WORD";
> >
> >while (<>) {
> >s/$word/lie/g; #Slow
> >}
> >
> >is slow because that $word forces the regex to
> >be recompiled each time through. The best way
> >to solve this problem is to create a Perl
> >script on the fly and run using eval $script;
>
> Not true about that
On Mar 21, Jonathan E. Paton said:
>> I have a one big text file and also I have some
>> set of strings to be replaced by another set of
>> strings. Currently, I am reading each line of
>> the file, and replacing one set of strings by
>> another set of strings, one after another. Is
>> there any
> I have a one big text file and also I have some
> set of strings to be replaced by another set of
> strings. Currently, I am reading each line of
> the file, and replacing one set of strings by
> another set of strings, one after another. Is
> there any efficient way of doing this? The data
> i
my $new_file;
open(FILE,') {
$line=~s/WORD_TO_REPLACE/REPLACEMENT_WORD/g;
$new_file.=$line;
}
close(FILE);
open(FILE,'>new_file.txt') or die "Can't write new_file.txt: $!\n";
print FILE $new_file;
close(FILE)
I do something like this. Hope it helps
>- Original Message -
>From: "R
Try this algorithm :
Read the file (if you have sufficient memory to load it)
Replace in each ligne
Write the new lines
P. Boisieau
>From: Rajanikanth Dandamudi <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Help Required - Search and Replace
>Date: Thu, 21 Mar 20
Try this algorithm :
>From: Rajanikanth Dandamudi <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Help Required - Search and Replace
>Date: Thu, 21 Mar 2002 10:55:41 +0530
>
>All,
>
>I have a one big text file and also I have some set of strings to be
>replaced by
Try this algorithm :
>From: Rajanikanth Dandamudi <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Help Required - Search and Replace
>Date: Thu, 21 Mar 2002 10:55:41 +0530
>
>All,
>
>I have a one big text file and also I have some set of strings to be
>replaced by
73 matches
Mail list logo