how to assign an external command aoutput to an array

2004-10-15 Thread Mauro
I have to assign output of ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%usr%sys%wio %idle/ { getline ; printf "%i %i %i %i", $2, $3, $4, $5 }' to an array. The output looks like: 0 0 0 100 if I did: my @pippo=qx'ssh [EMAIL PROTECTED] sar -u 1 1|awk \'/%usr%sys%wio %idle/ { getline ; pr

Re: how to assign an external command aoutput to an array

2004-10-15 Thread Mauro
Ok Ok i found solution: my $got_value=qx'.'; my @values=split / /,$got_value: Thank You - Original Message - From: "Mauro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 15, 2004 9:23 AM Subject: how to assign an external command aoutput to an array > I hav

ntlm auth

2004-10-15 Thread Ing. Branislav Gerzo
Hi all, I changed my work, I'm behind MS proxy, I need authenticate on our proxy (NTLM). But I can't get it to work: use LWP::Debug qw(+); use LWP::UserAgent; use HTTP::Request::Common; my $url = 'http://www.google.com'; # Set up the ntlm client and then the base64 encoded ntlm handshake message

Re: ntlm auth

2004-10-15 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Friday, October 15, 2004 at 10:45 (+0200) typed: IBG> I changed my work, I'm behind MS proxy, I need authenticate on our IBG> proxy (NTLM). But I can't get it to work: I tried 'NTLM Authorization Proxy Server' v.0.9.7. ( http://www.geocities.com/rozmanov/ntlm/ ) it

IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
greetings, This program listens on a port for an incoming connection. Once someone connected it asks for a name and a password. but for some reason I can't get it to read the name/password entered. what am i missing please... while (($client,$client_address) = $server->accept()) {

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
ok it seems like the chomp it stuffin it up ? if i removed it i get the correct data but with a \n On Friday 15 October 2004 11:56, Etienne Ledoux wrote: > greetings, > > This program listens on a port for an incoming connection. Once someone > connected it asks for a name and a password. but fo

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Etienne Ledoux
Would anybody have any idea why chomp is deleting the value ? No matter how I try and do it. I even tried s/\n//,$value . afterwards I have a empty value. I don't understand what I'm doing wrong here and everywhere i check this it seems to be the right way to do it. ?!?! e. On Friday 15 O

Re: RegExp

2004-10-15 Thread Jenda Krynicky
From: "JupiterHost.Net" <[EMAIL PROTECTED]> > Mandar Rahurkar wrote: > >I have a bunch of text (multiple paragraphs). I want to find a > >sentence > > like 'Susan * the water' (No its not a HW problem). Here's what I am > > doing: > > > > #! /usr/bin/perl > > use strict; > > > use warni

strict & getopt()

2004-10-15 Thread Christian Stalp
Hello together, I have a new problem. What can I do to use getopt() and use strict? If I use strict I have to declare all of my variables. And if I do this, perl ignores my getopt(s) single-chars. Is this normal? What can I do to solve this? I want to use perl with "-w" option and the "strict

Re: RegExp

2004-10-15 Thread JupiterHost.Net
local $/=""; why ?? Because otherwise the would read individual lines. And the sentence can easily be split to several lines. If you set $/ to "" then the file is read in paragraphs, not lines. That is each now returns several lines until it finds an empty one. You rock Jenda! I always learn

Re: IO::Socket - i can't get it to read the data

2004-10-15 Thread Jeff 'japhy' Pinyan
On Oct 15, Etienne Ledoux said: >Would anybody have any idea why chomp is deleting the value ? > >No matter how I try and do it. I even tried s/\n//,$value . afterwards I have >a empty value. I don't understand what I'm doing wrong here and everywhere i >check this it seems to be the right way to

Re: strict & getopt()

2004-10-15 Thread Jeff 'japhy' Pinyan
On Oct 15, Christian Stalp said: >What can I do to use getopt() and use strict? Declare your variables with our() if you're using Perl 5.6 or better; otherwise, declare them with 'use vars'. >If I use strict I have to declare all of my variables. And if I do this, perl >ignores my getopt(s) sing

Re: counting gaps in sequence data

2004-10-15 Thread Errin Larsen
On Thu, 14 Oct 2004 16:11:42 -0600, Michael Robeson <[EMAIL PROTECTED]> wrote: > Yeah, I have just submitted that same question verbatim to the bio-perl > list. I am still running through some ideas though. I have both > Bioinformatics perl books. They are not very effective teaching books. > > Th

Re: strict & getopt()

2004-10-15 Thread Christian Stalp
> Declare your variables with our() if you're using Perl 5.6 or better; > otherwise, declare them with 'use vars'. All right, it works now, thank you very much. > If you're using Perl 5.6, don't use "-w" anymore, use the "warnings" > pragma. warnings? How does this works? #!/usr/bin/perl warnin

Re: counting gaps in sequence data

2004-10-15 Thread Michael Robeson
Errin, Thanks so much! I will spend the weekend going over what you've posted. Looks like I will learn a lot from this post alone. This stuff is so addictive. I can spend hours doing this and not realize it. If I am successful or not is another story! :-) I'll definitely let you know if I have

Questions related to draw graphy using perl

2004-10-15 Thread Li, Aiguo (NIH/NCI)
Dear all. I am a new user of Perl with some experience in perl data extraction with pattern matching, but never did anything with making graphy using perl. I need to draw a chromosome copy number graphy and p-values. The data looks are as follow: SNP id physical location copy number

Re: Questions related to draw graphy using perl

2004-10-15 Thread Chris Devers
On Fri, 15 Oct 2004, Li, Aiguo (NIH/NCI) wrote: > Is it possible to create graphs like this using perl? > > The graph in my mind should look like this and it will be better to > use histogram bar for meta p-values. > > > ---| > --| >| > -| Interesting -- that's not one of the t

Reference syntax...

2004-10-15 Thread Steve Bertrand
I'm reading Perl ORM book right now, and I'd just like to know what is generally more accepted... This format: @$array or this: @{$array} Tks, Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Reference syntax...

2004-10-15 Thread Wiggins d Anconia
> I'm reading Perl ORM book right now, and I'd just like to know what is > generally more accepted... > Both are accepted since they work :-)... > This format: > > @$array > I generally stick with this until I need the below option. It is less cluttered and shorter to type (though the first i

Re: emacs and perl

2004-10-15 Thread Jon Mosco
I know how to do the like, I have been an emacs user for some time now. Cperl mode is much better than regular perl mode. I was looking for a way to run my code in emacs, not write or edit code, thats someting I can do already. I know I can run a shell in another buffer, under my code and that

Piping output to and from external perl routine

2004-10-15 Thread Dan Fish
Is there an easy way to pipe output to an external perl routine and then pipe the output of that routine back in for more processing? In particular I want to use LWP::UserAgent to grab a web page, pipe the output to Tom Christiansen's "striphtml" routine (http://www.cpan.org/authors/Tom_Christians

Re: Piping output to and from external perl routine

2004-10-15 Thread Wiggins d Anconia
> Is there an easy way to pipe output to an external perl routine and then > pipe the output of that routine back in for more processing? > > In particular I want to use LWP::UserAgent to grab a web page, pipe the > output to Tom Christiansen's "striphtml" routine > (http://www.cpan.org/authors/To

Re: Piping output to and from external perl routine

2004-10-15 Thread Gunnar Hjalmarsson
Dan Fish wrote: Is there an easy way to pipe output to an external perl routine and then pipe the output of that routine back in for more processing? It depends on what the external Perl routine does. In particular I want to use LWP::UserAgent to grab a web page, pipe the output to Tom Christiansen

Re: RegExp

2004-10-15 Thread Mandar Rahurkar
Thanks Guys this is good however what does character class inside the square brackets mean.. I think I need to get mastering regular expressions book.. Mandar > > while (/(susan[^.?!]+the\s+water\b)/ig) { > print $1,"\n"; > } > > Jenda > = [EMAIL PROTECTED] === ht

Installing Perl DBI and Oracle DBD in AIX 5.1

2004-10-15 Thread Pablo Salinas
Hi there, I have an AIX 5.1 machine and I wish to use the perl DBI and oracle DBD in this machine. I have tried to install them by downloading DBI-1.45.tar and DBD-Oracle-2.15.tar files from http://www.cpan.org/ So, I uncompressed the DBI-1.45.tar file and followed the README file inst

Re: Installing Perl DBI and Oracle DBD in AIX 5.1

2004-10-15 Thread Wiggins d Anconia
> Hi there, > I have an AIX 5.1 machine and I wish to use > the perl DBI and oracle DBD in this machine. I have > tried to install them by downloading DBI-1.45.tar and > DBD-Oracle-2.15.tar files from http://www.cpan.org/ > This is a rather difficult combination and I know there has bee

Re: RegExp

2004-10-15 Thread Steve Bertrand
> Thanks Guys this is good however what does character class inside the > square brackets mean.. > I think I need to get mastering regular expressions book.. Read: # perldoc perlretut and: # perldoc perlre which will help give you an understanding of regex's. This is only my opinion of course, a

Re: how to assign an external command aoutput to an array

2004-10-15 Thread John W. Krahn
Mauro wrote: I have to assign output of ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%usr%sys%wio %idle/ { getline ; printf "%i %i %i %i", $2, $3, $4, $5 }' to an array. The output looks like: 0 0 0 100 if I did: my @pippo=qx'ssh [EMAIL PROTECTED] sar -u 1 1|awk \'/%usr%sys%wio %idle/ {

Re: Reference syntax...

2004-10-15 Thread John W. Krahn
Wiggins d Anconia wrote: Usually when you need this is when you have multiple depths of references and the syntax becomes ambiguous to the interpreter. Something like, @{$hashref->{$scalar}} In this case without the {} the interpreter can't tell if you mean, Yes, the interpreter can tell because of

Re: Piping output to and from external perl routine

2004-10-15 Thread John W. Krahn
Dan Fish wrote: Is there an easy way to pipe output to an external perl routine and then pipe the output of that routine back in for more processing? In particular I want to use LWP::UserAgent to grab a web page, pipe the output to Tom Christiansen's "striphtml" routine (http://www.cpan.org/authors

Re: Reference syntax...

2004-10-15 Thread Mark Goland
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: "Wiggins d Anconia" <[EMAIL PROTECTED]>; "Perl Beginners" <[EMAIL PROTECTED]> Sent: Friday, October 15, 2004 11:30 PM Subject: Re: Reference syntax... > Wiggins d Anconia wrote: > > > > Usually when you need this is when