Re: interface Perl script with an external website (Pass Values to a web)

2007-11-01 Thread newBee
On Nov 1, 7:39 am, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Nov 1, 1:32 am, [EMAIL PROTECTED] (newBee) wrote: > > > I am in the process creating in some queries using a Perl script and > > want to run the out put of the perl script against another external > > software. As example lets say I have

setModuleName-purpose

2007-11-01 Thread neelike
Hi, my $moduleName = __PACKAGE__ ; #generally we can ues the above line for writing the package name out multiple times inside our package setModuleName($moduleName); #In that line we are assigning the module name to the setModuleName method.Let me know the purpose of this method and Where c

Re: Filehandle and redirection of STDOUT

2007-11-01 Thread Phillip Gonzalez
Actually, Yes, it does work. I used it today at work to convert about 800 private ip's to their hostnames. Just have to make sure that your file containing ip's is in the same directory as the perl program. I'm very new to perl and was amazed myself that it actually worked! LoL. Thanks

Re: Filehandle and redirection of STDOUT

2007-11-01 Thread Rob Dixon
Phillip Gonzalez wrote: Hi, I'm trying to print stdout to a file, then switch back to the default standard out so that it prints to the screen. This script takes a list of ip's and does a reverse lookup on them, it then saves the output to "reverse.txt". Here's my code: #!/usr/bin/perl u

Re: Filehandle and redirection of STDOUT

2007-11-01 Thread yitzle
1) You can use the backticks (``) or qx// quoting to capture the output which you can then write to a file 2) Use the Perl select command. From the Perldoc: select FILEHANDLE ... a write or a print without a filehandle will default to this FILEHANDLE 3) Use the shell's own redirection. See http:/

Filehandle and redirection of STDOUT

2007-11-01 Thread Phillip Gonzalez
Hi, I'm trying to print stdout to a file, then switch back to the default standard out so that it prints to the screen. This script takes a list of ip's and does a reverse lookup on them, it then saves the output to "reverse.txt". Here's my code: #!/usr/bin/perl use strict; use warning

Re: SSH with PERL

2007-11-01 Thread Tom Phoenix
On 11/1/07, lerameur <[EMAIL PROTECTED]> wrote: > I wrote a small script, the manual upload of a file works, but gives > me an error message:unable to initialize mechanism library [/usr/lib/ > gss/gl/mech_krb5.so] > Could some tell me what this is about? it does end up transferirng the > file. As

Re: Is Perl object passed by reference automatically in function call?

2007-11-01 Thread Tom Phoenix
On 1 Nov 2007 15:36:09 -0700, howa <[EMAIL PROTECTED]> wrote: > So if I have an object, I don't have to pass its reference to function > for performance gain? > > is that true? What performance gain are you talking about? When someone speaks of passing an object to a function in Perl, that norma

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Paul Lalli
On Nov 1, 6:35 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote: > Paul Lalli schreef: > > You need @{$xValues} and @{$yValues}. > > Thanks for the correction of my stupid typoes. In the line that came > after what you quote, and in the code that followed it, it is OK. > BTW, the {} are not needed. Not in t

Re: Is Perl object passed by reference automatically in function call?

2007-11-01 Thread Chas. Owens
On 1 Nov 2007 15:36:09 -0700, howa <[EMAIL PROTECTED]> wrote: > So if I have an object, I don't have to pass its reference to function > for performance gain? > > is that true? snip Objects are only stored as references, so yes, when you pass one to a function, it is by reference. -- To unsubscr

Is Perl object passed by reference automatically in function call?

2007-11-01 Thread howa
So if I have an object, I don't have to pass its reference to function for performance gain? is that true? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Dr.Ruud
Paul Lalli schreef: > Dr.Ruud: >> [EMAIL PROTECTED]: >>> sub graph >>> { >>> my @Xvalues = @{ $_[0] }; # remember to use "my"! >>> my @Yvalues = @{ $_[1] }; # remember to use "my"! >> >> A graph subroutine is not likely to change the input data, so there >> is no re

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Paul Lalli
On Nov 1, 4:53 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote: > [EMAIL PROTECTED] schreef: > > > sub graph > > { > > my @Xvalues = @{ $_[0] }; # remember to use "my"! > > my @Yvalues = @{ $_[1] }; # remember to use "my"! > > A graph subroutine is not likely to change the inp

Re: SCP::NET 'put' error

2007-11-01 Thread Dr.Ruud
lerameur schreef: > my $file_to_put =''test.txt'' ; Double single quotes? -- Affijn, Ruud (always codes and mails and posts in a monospaced font) "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > sub graph > { > my @Xvalues = @{ $_[0] }; # remember to use "my"! > my @Yvalues = @{ $_[1] }; # remember to use "my"! A graph subroutine is not likely to change the input data, so there is no reason to copy the input data. m

Re: help on replacing text in a file

2007-11-01 Thread John W . Krahn
On Thursday 01 November 2007 11:25, boxingcat wrote: > / Sorry if it is a repost. didn't see the first one in the group. > > > I would like to replace string 1 with string 2 in file3.dat, here is > what I did: > > #!/usr/bin/perl use warnings; use strict; > @inputfile= ("string1"); # need to h

SCP::NET 'put' error

2007-11-01 Thread lerameur
Hello, I wrote a small program to test the SCP function. The program simply outputs Died at line 44, which is the line for the put function my $file_to_put =''test.txt'' ; $SCP->put($file_to_put) or die $SCP->{errstr}; is the problem on putting the actual file, or is it more on finding tha

SSH with PERL

2007-11-01 Thread lerameur
hello, I wrote a small script, the manual upload of a file works, but gives me an error message:unable to initialize mechanism library [/usr/lib/ gss/gl/mech_krb5.so] Could some tell me what this is about? it does end up transferirng the file. thanks /tom/ken>scp test.txt tacoma:/export/home/ken

Re: XMLout and suppressempty

2007-11-01 Thread ernond_paul
> You should also consider upgrading your XML::Simple, as modern > versions of it allow SuppressEmpty for XMLout() as well as XMLin(). ok, I've" just upgraded to 2.18, and It seems to work well now.. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

help on replacing text in a file

2007-11-01 Thread boxingcat
/ Sorry if it is a repost. didn't see the first one in the group. I would like to replace string 1 with string 2 in file3.dat, here is what I did: #!/usr/bin/perl @inputfile= ("string1"); # need to have an arrary later @outputfile=("string2"); @attfile=("file3.dat"); $mytempfile=$inputfile[0]

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread jl_post
On Nov 1, 9:35 am, [EMAIL PROTECTED] (Charles) wrote: > > I have module from CPAN named Graph. I have created a subroutine for > this to pass in two arrays; x-axis and y-axis into my Graph subroutine > i.e. ; &graph( @Xvalues, @Yvalues ); > > My confusions is: in my subroutine, I cannot treat the

help on replacing text in a file

2007-11-01 Thread boxingcat
I would like to replace string 1 with string 2 in file3.dat, here is what I did: #!/usr/bin/perl @inputfile= ("string1"); # need to have an arrary later @outputfile=("string2"); @attfile=("file3.dat"); $mytempfile=$inputfile[0]; $youtempfile=$outputfile[0]; $hisfile=$attfile[0]; perl -pi -e 's

Re: XMLout and suppressempty

2007-11-01 Thread Rob Dixon
[EMAIL PROTECTED] wrote: Hi, I would like to suppress empty element when I output mu hash with XMLout but the option "suppressempty" only seeme to work with XMLin : "suppressempty => 1 | '' | undef (in) : This option controls what XMLin() should do [...]" So, I've tried to undef element before

Re: XMLout and suppressempty

2007-11-01 Thread Paul Lalli
On Nov 1, 10:09 am, [EMAIL PROTECTED] (Ernond Paul) wrote: > I would like to suppress empty element when I output mu hash with > XMLout > but the option "suppressempty" only seeme to work with XMLin : > "suppressempty => 1 | '' | undef (in) : This option controls what > XMLin() should do [...]" Yo

Re: XMLout and suppressempty

2007-11-01 Thread Paul Lalli
On Nov 1, 10:09 am, [EMAIL PROTECTED] (Ernond Paul) wrote: > Hi, > > I would like to suppress empty element when I output mu hash with > XMLout > but the option "suppressempty" only seeme to work with XMLin : > "suppressempty => 1 | '' | undef (in) : This option controls what > XMLin() should do [.

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Paul Lalli
On Nov 1, 11:35 am, [EMAIL PROTECTED] (Charles) wrote: > Three days of head-banging An hour of FAQ and Documentation reading would have been more productive... > the Boss has my walking papers if I don't "get'er done"! > > I have module from CPAN named Graph. I have created a subroutine for

Re: Help with passing arrays to a Perl subroutine

2007-11-01 Thread Gunnar Hjalmarsson
Charles wrote: Three days of head-banging Unnecessary, since this is a FAQ. the Boss has my walking papers if I don't "get'er done"! I have module from CPAN named Graph. I have created a subroutine for this to pass in two arrays; x-axis and y-axis into my Graph subroutine i.e. ; &graph(

Re: outlook module

2007-11-01 Thread oryann9
- Original Message From: oryann9 <[EMAIL PROTECTED]> To: Perl List Sent: Thursday, November 1, 2007 1:02:35 PM Subject: Re: outlook module > I am looking for some humble advice. I keep getting annoying emails using the mail client 'Outlook 2003 SP2.' These messages are intended for

Re: outlook module

2007-11-01 Thread oryann9
> I am looking for some humble advice. I keep getting annoying emails using the mail client 'Outlook 2003 SP2.' These messages are intended for another > person in my company with the same name as I. Not to my surprise, the email support group decided to give this person an email address that

XMLout and suppressempty

2007-11-01 Thread ernond_paul
Hi, I would like to suppress empty element when I output mu hash with XMLout but the option "suppressempty" only seeme to work with XMLin : "suppressempty => 1 | '' | undef (in) : This option controls what XMLin() should do [...]" So, I've tried to undef element before call XMLOut : undef

Help with passing arrays to a Perl subroutine

2007-11-01 Thread Charles
Help Three days of head-banging the Boss has my walking papers if I don't "get'er done"! I have module from CPAN named Graph. I have created a subroutine for this to pass in two arrays; x-axis and y-axis into my Graph subroutine i.e. ; &graph( @Xvalues, @Yvalues ); My confusions is: in

Re: outlook module

2007-11-01 Thread Tom Phoenix
On 11/1/07, oryann9 <[EMAIL PROTECTED]> wrote: > I want to parse these .msg, files look for certain keywords, if these > keywords are found compose a reply email that contains a pre-written > message template to the original sender. > > What module will fit my needs? There's lots of modules on C

Re: errror while installing DBD::MYSQL.

2007-11-01 Thread Tom Phoenix
On 10/31/07, Siva Prasad <[EMAIL PROTECTED]> wrote: > I use correct capital words and also used perl Makefile.pl --help could not > figure out where I am wrong? Are you still getting the message "Can't locate DBD/mysql.pm in @INC"? If so, the module isn't properly installed yet. Cheers! --Tom P

RE: outlook module

2007-11-01 Thread Jo for Groups and Lists
It seems to me that your network admins need to correct their faulty procmail routing recipes. It should not be your job to deal with this. Do the network admins have any idea how big a problem this is? Not only for your inconvenience, but for the other person not receiving messages? Jo -- To u

Re: FileHandle

2007-11-01 Thread Rob Dixon
Beginner wrote: On 1 Nov 2007 at 19:43, Kaushal Shriyan wrote: Thanks Rob Its working Fine, Now when I am using the below code to write something to file "messages" the below code is not writing the text "write some text " to the file messages. ##

Re: FileHandle

2007-11-01 Thread Paul Lalli
On Nov 1, 10:00 am, [EMAIL PROTECTED] (Beginner) wrote: > On 1 Nov 2007 at 19:20, Kaushal Shriyan wrote: > > > > > > > Hi > > > I am using FileHandle, Below is my code > > > > > #!/usr/bin/perl > > > use warnings; > > use strict; > > > open(LOGFILE, "message

Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Paul Lalli
On Nov 1, 9:10 am, [EMAIL PROTECTED] (Jay Savage) wrote: > That's back to the whole void business. In a void context, it should > return the empty string on success, and undef on failure. In any other > context, it should return the file contents on success. Clearly, I was > confused about the cont

outlook module

2007-11-01 Thread oryann9
All, I am looking for some humble advice. I keep getting annoying emails using the mail client 'Outlook 2003 SP2.' These messages are intended for another person in my company with the same name as I. Not to my surprise, the email support group decided to give this person an email address that

Re: FileHandle

2007-11-01 Thread Beginner
On 1 Nov 2007 at 19:43, Kaushal Shriyan wrote: > Thanks Rob > > Its working Fine, Now when I am using the below code to write something to > file "messages" > the below code is not writing the text "write some text " to the file > messages. > > ## > #!

Re: FileHandle

2007-11-01 Thread Kaushal Shriyan
Thanks Rob Its working Fine, Now when I am using the below code to write something to file "messages" the below code is not writing the text "write some text " to the file messages. ## #!/usr/bin/perl use strict; use warnings; open(LOGFILE, "messages"

Re: FileHandle

2007-11-01 Thread Rob Dixon
Kaushal Shriyan wrote: Hi I am using FileHandle, Below is my code #!/usr/bin/perl use warnings; use strict; open(LOGFILE, "messages") || warn "Could not open messages"; open(DATA, ">/tmp/data") || die "Could not create /tmp/data\n." while () {

Re: FileHandle

2007-11-01 Thread Beginner
On 1 Nov 2007 at 19:20, Kaushal Shriyan wrote: > Hi > > I am using FileHandle, Below is my code > > > #!/usr/bin/perl > > use warnings; > use strict; > > open(LOGFILE, "messages") > || warn "Could not open messages"; > open(DATA, ">/tmp/data") |

FileHandle

2007-11-01 Thread Kaushal Shriyan
Hi I am using FileHandle, Below is my code #!/usr/bin/perl use warnings; use strict; open(LOGFILE, "messages") || warn "Could not open messages"; open(DATA, ">/tmp/data") || die "Could not create /tmp/data\n." while () { print "$_\n" if

Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Jenda Krynicky
From: Jeff Pang <[EMAIL PROTECTED]> > This discussion let me think a thing that, one of my co-workers, who > is good at both C and perl programming. When coding with Perl, he > always like to put a 'return 0' on the end of each subroutines (maybe > learn the habit from C?). So for

Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Jay Savage
On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: [snip] > The docs could always be more clear. The right operand of an > or-operator does inherit the context of the operator itself. But the > left operand's context is always Boolean. > Thanks for clearing that up! > > Given that, I would expec

Re: Include variables from external perl script

2007-11-01 Thread Ron Bergin
On Oct 30, 6:50 pm, [EMAIL PROTECTED] (Howa) wrote: > On 10 30 , 9 38 , [EMAIL PROTECTED] (Ron Bergin) wrote: > > > On Oct 30, 3:34 am, [EMAIL PROTECTED] (Jeff Pang) wrote: > > > In addition to changing 'my' to our' in Config.pl, you'll also need to > > add the 'our $value;' to Script.pl > > yes

Re: interface Perl script with an external website (Pass Values to a web)

2007-11-01 Thread Paul Lalli
On Nov 1, 1:32 am, [EMAIL PROTECTED] (newBee) wrote: > I am in the process creating in some queries using a Perl script and > want to run the out put of the perl script against another external > software. As example lets say I have Perl script which takes a query > string cleanup all wild characte

Re: interface Perl script with an external website (Pass Values to a web)

2007-11-01 Thread Jeff Pang
-Original Message- >From: newBee <[EMAIL PROTECTED]> >Sent: Nov 1, 2007 1:32 PM >To: beginners@perl.org >Subject: interface Perl script with an external website (Pass Values to a web) > >I am in the process creating in some queries using a Perl script and >want to run the out put of the p

interface Perl script with an external website (Pass Values to a web)

2007-11-01 Thread newBee
I am in the process creating in some queries using a Perl script and want to run the out put of the perl script against another external software. As example lets say I have Perl script which takes a query string cleanup all wild characters and run that against the Google, Yahoo, Ask etc. How can i