I've searched CPAN, but have not found an equivalent module such as
Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Oct 6, 11:26 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
> > Message du 06/10/08 17:03
> > De : "[EMAIL PROTECTED]"
> > A : [EMAIL PROTECTED]
> > Copie à :
> > Objet : data from file
>
> > Hi,
>
> > I have large file in following format:
>
> > ID | Time | IP | Code
>
> > Now I want to write script
What is the easiest method to search in a file for a particular term,
and output a desired field.
For example, in awk, I would simply do:
awk '/searchterm/ {print $2}' input.txt
to get my result.
But in Perl, the shortest way I could find achieve the same result
was:
$inputfile=input.txt;
open(
Hi,
I have seen the following is a book
use strict;
use warnings;
use FindBin qw($Bin);
use Path::Class;
use lib dir ($Bin,'..','lib')->stringify;
An adopted it into a script of my own. I understand that this FindBin
will allow the code to be ported between OS's. That's isn't massively
importa
On Tue, 2008-10-07 at 12:36 +0100, Dermot wrote:
> Hi,
>
> I have seen the following is a book
>
>
> use strict;
> use warnings;
> use FindBin qw($Bin);
> use Path::Class;
> use lib dir ($Bin,'..','lib')->stringify;
>
>
> An adopted it into a script of my own. I understand that this FindBin
>
On Mon, Oct 06, 2008 at 08:32:22PM -0400, Stephen Gallagher wrote:
> I can come up with one example where this might be interesting. Imagine you
> are a software tester and were tasked with identifying all potential
> variable combinations that needed to be covered/tested. Risk mitigation,
> don
Hi All!
I've found interesting comparison table of Perl editors and IDE
http://www.perlmonks.org/?node=Perl%20Development%20Tools
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Tue, Oct 7, 2008 at 2:45 PM, <[EMAIL PROTECTED]> wrote:
> Hi All, i found this as a Bug in Perl
>
> consider
>for($i=0;$i<0.4;$i=$i+0.1)
> {
>print "$i\n";
>}
>
>
> here you wiil get output as expected...
> 0 to 0.3
> it work fine till test is $i<0.7...UPTO HERE EV
On Tue, Oct 07, 2008 at 03:07:17PM +0200, Rob Coops wrote:
> On Tue, Oct 7, 2008 at 2:45 PM, <[EMAIL PROTECTED]> wrote:
>
> > Hi All, i found this as a Bug in Perl
> > isn't it a Joke
> Is that a bug in Perl really? Or is it just that floating point operations
> are never exact and this deviatio
On Mon, 2008-10-06 at 14:26 -0700, [EMAIL PROTECTED] wrote:
> This one-liner does pretty much what I would want but I do not know
> how to convert it to a script.
>
> perl -lane 'print $F[2] if /searchterm/' input.txt
See `perldoc perlrun` and look up -a and -n under "Command Switches".
--
Jus
- Original Message -
From: "Jason Trebilcock" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: Monday, October 6, 2008 7:57:23 PM GMT -05:00 US/Canada Eastern
Subject: RE: combinations
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2008 12:
On Mon, Oct 6, 2008 at 8:32 AM, Rob Coops <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 6, 2008 at 2:16 PM, Praveena Vittal <[EMAIL PROTECTED]
> >wrote:
>
> > Hi All,
> >
> > I like to do some certification in perl,but i could not get any
> information
> > about the available certifications in perl .
>
Hi All, i found this as a Bug in Perl
consider
for($i=0;$i<0.4;$i=$i+0.1)
{
print "$i\n";
}
here you wiil get output as expected...
0 to 0.3
it work fine till test is $i<0.7...UPTO HERE EVERYTHING IS GOING
RIGHT
BUT magic starts here
for($i=0;$i<0.8;$i=$i+0.1)
From: [EMAIL PROTECTED]
> Hi All, i found this as a Bug in Perl
>
> consider
> for($i=0;$i<0.4;$i=$i+0.1)
> {
> print "$i\n";
> }
>
>
> here you wiil get output as expected...
> 0 to 0.3
> it work fine till test is $i<0.7...UPTO HERE EVERYTHING IS GOING
> RIGHT
>
From: Ryan <[EMAIL PROTECTED]>
> While I agree that it would be a good homework assignment it's not.
> What I have is a logic look up table for health records using an EAV
> model (in an SQL table):
>
> rowID - key - value
>
> From a web form I select some keys and values. When subm
> "Raymond" == Raymond Wan <[EMAIL PROTECTED]> writes:
Raymond> I don't know if libraries purchase books from publishers so that in
Raymond> somewhat compensates for the number of people who use it (i.e., do
Raymond> they pay a higher price). But surely better than piracy and
Raymond> "free".
Hi Randal,
Randal L. Schwartz wrote:
"Raymond" == Raymond Wan <[EMAIL PROTECTED]> writes:
Raymond> I don't know if libraries purchase books from publishers so that in
Raymond> somewhat compensates for the number of people who use it (i.e., do
Raymond> they pay a higher price).
[EMAIL PROTECTED] wrote:
>
> Hi All, i found this as a Bug in Perl
>
> consider
> for($i=0;$i<0.4;$i=$i+0.1)
> {
> print "$i\n";
> }
>
>
> here you wiil get output as expected...
> 0 to 0.3
> it work fine till test is $i<0.7...UPTO HERE EVERYTHING IS GOING
> RIGHT
Dermot wrote:
>
> I have seen the following is a book
>
>
> use strict;
> use warnings;
> use FindBin qw($Bin);
> use Path::Class;
> use lib dir ($Bin,'..','lib')->stringify;
>
>
> An adopted it into a script of my own. I understand that this FindBin
> will allow the code to be ported between
[EMAIL PROTECTED] wrote:
What is the easiest method to search in a file for a particular term,
and output a desired field.
For example, in awk, I would simply do:
awk '/searchterm/ {print $2}' input.txt
to get my result.
But in Perl, the shortest way I could find achieve the same result
was:
On Tue, Oct 07, 2008 at 10:07:21AM -0700, John W. Krahn wrote:
> [EMAIL PROTECTED] wrote:
>> This one-liner does pretty much what I would want but I do not know
>> how to convert it to a script.
>> perl -lane 'print $F[2] if /searchterm/' input.txt
>
> #!/usr/bin/perl
> $\ = "\n";
> while ( <> ) {
loody wrote:
>> if( exists $data{$key} ){
>>print "\t\$data{$key} exists\n";
>
> thanks for your kind help.
> Could I get the conclusion that exists is only used for determining
> the element of hash and arrays?
> appreciate your help,
Consider this program.
use strict;
use warnings;
Jeff Pang wrote:
>> Message du 06/10/08 14:22 De : "Praveena Vittal"
>>
>> I like to do some certification in perl,but i could not get any
>> information about the available certifications in perl .
>
> Who asked you for that? Ok you say you have read all the books below, that
> will be enough for
Rob Dixon wrote:
loody wrote:
if( exists $data{$key} ){
print "\t\$data{$key} exists\n";
thanks for your kind help.
Could I get the conclusion that exists is only used for determining
the element of hash and arrays?
appreciate your help,
Consider this program.
use strict;
use warning
John W. Krahn wrote:
> Rob Dixon wrote:
>> loody wrote:
if( exists $data{$key} ){
print "\t\$data{$key} exists\n";
>>> thanks for your kind help.
>>> Could I get the conclusion that exists is only used for determining
>>> the element of hash and arrays?
>>> appreciate your help,
>> Co
[EMAIL PROTECTED] wrote:
> On Oct 6, 11:26 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
>> [EMAIL PROTECTED] wrote:
>>>
>>> I have large file in following format:
>>> ID | Time | IP | Code
>>>
>>> Now I want to write script that will cluster data by IP addr. and
>>> count total number of IDs for corres
irata wrote:
>
> can someone explain me, why this short regex don't give the result I
> expect:
>
> perl -e '$text = "(7) 32"; printf "[%s][%s]\n", ( $text =~ /\((\d+)
> \)\s+(\d+)/ )'
>
> I supposed that the output is "[7][32]", but the output is "[][]". I
> don't know why...
Your regular e
On Tue, 2008-10-07 at 21:09 +0100, Rob Dixon wrote:
> Incorrect, delete does not remove array elements:
> >
> > $ perl -le'use Data::Dumper; my @a = "a".."d"; delete $a[1]; print
> > Dumper [EMAIL PROTECTED]'
> > $VAR1 = [
> >'a',
> >undef,
> >'c',
> >
On Tue, Oct 7, 2008 at 4:09 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> John W. Krahn wrote:
[snip]
>> Incorrect, delete does not remove array elements:
>>
>> $ perl -le'use Data::Dumper; my @a = "a".."d"; delete $a[1]; print
>> Dumper [EMAIL PROTECTED]'
>> $VAR1 = [
>>'a',
>>
On Tue, 2008-10-07 at 22:01 -0400, Jay Savage wrote:
> On Tue, Oct 7, 2008 at 4:09 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> > John W. Krahn wrote:
> [snip]
> >> Incorrect, delete does not remove array elements:
> >>
> >> $ perl -le'use Data::Dumper; my @a = "a".."d"; delete $a[1]; print
> >> Dump
30 matches
Mail list logo