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
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
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
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
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:/
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
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
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
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
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
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/
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
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
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/
[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
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
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
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
> 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
/ 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]
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
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
[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
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
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 [.
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
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(
- 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
> 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
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
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
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
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
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
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.
##
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
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
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
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.
>
> ##
> #!
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"
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 () {
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") |
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
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
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
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
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
-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
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
49 matches
Mail list logo