Re: warnings.pm and $^W

2005-04-07 Thread JupiterHost.Net
Hello, Anyone have any idea how to tell is its in use warnings or no warnings mode? Did you read "perldoc warnings"? :) sure enough, that was kinda dumb... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: warnings.pm and $^W

2005-04-07 Thread John W. Krahn
JupiterHost.Net wrote: The $^W flag can allow you see if -w has been specified: $ perl -mstrict -we 'warn "Danger Will Robinson" if $^W;' Danger Will Robinson at -e line 1. $ but if you use warnings instead it doesn;t work: $ perl -mstrict -e 'use warnings;warn "warn" if $^W;no warnings;warn "foo"

warnings.pm and $^W

2005-04-07 Thread JupiterHost.Net
The $^W flag can allow you see if -w has been specified: $ perl -mstrict -we 'warn "Danger Will Robinson" if $^W;' Danger Will Robinson at -e line 1. $ but if you use warnings instead it doesn;t work: $ perl -mstrict -e 'use warnings;warn "warn" if $^W;no warnings;warn "foo" if $^W;' $ Anyone hav

Re: Mail::Sender

2005-04-07 Thread Mike Blezien
Try seperating your $toList email addresses with a comma instead of the semi colon Ravinder Arepally wrote: All, I am having problem when I use multiple users in to or cc list while sending a email. I am using Mail::Sender module. I have a list of email addresses in $toList and I am just usi

Mail::Sender

2005-04-07 Thread Ravinder Arepally
All, I am having problem when I use multiple users in to or cc list while sending a email. I am using Mail::Sender module. I have a list of email addresses in $toList and I am just using that for to list. I am not getting any email or error message. If I just use on email address like [EMA

Re: Perl Socket Client for C++ Server

2005-04-07 Thread Jay Savage
On Apr 7, 2005 2:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Jay, > > thanks for the answer. > > > Firt things first. Why did you comment out use strict? That's never > > a good sign. also, loading both IO::Socket::Unix and Socket probably > > isn't the best idea. the main proble

Re: Perl Socket Client for C++ Server

2005-04-07 Thread news-funsi
Hi Jay, thanks for the answer. > Firt things first. Why did you comment out use strict? That's never > a good sign. also, loading both IO::Socket::Unix and Socket probably > isn't the best idea. the main problem here, though would seem to be > mixing your syntax. You're calling the object-o

Re: Can't understand error

2005-04-07 Thread John W. Krahn
John W. Krahn wrote: Olivier, Wim W wrote: I get an error running this script on Win32 , but when I execute the actual command it works 100%. Does anyone see my problem here? The error I get is: "Error: Invalid message text." The debugger goes through fine, but complains at the 'system()' line.

Re: Can't understand error

2005-04-07 Thread John W. Krahn
Olivier, Wim W wrote: Hi all, Hello, I get an error running this script on Win32 , but when I execute the actual command it works 100%. Does anyone see my problem here? The error I get is: "Error: Invalid message text." The debugger goes through fine, but complains at the 'system()' line. notify

RE: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Charles K. Clarkson
Vladimir D Belousov wrote: : I want to give to print_array() function a reference to a part of : array. Array and that part of array may be very big and I wish to : avoid excessive copying of data. Therefore I don't want use splice : function. #!/usr/bin/perl use stric

RE: Which script called require?

2005-04-07 Thread Charles K. Clarkson
Charles K. Clarkson wrote: : BEGIN { : printf qq~ : In LIST context: : Package: %s : File: %s : Line number: %s : : ~, caller(); : : printf qq~ : In SCALAR context: : Package: %s : : ~, scalar caller(); : }

RE: How can I take subarray without second array (drop other elem ents)?

2005-04-07 Thread Moon, John
I have a function which prints array: sub print_array { my $array_ref = shift; for(@$array_ref){ print "$_\n"; } } And I have a big array, for example named @array. I want to print @array elements from N to N+100 using this function, but don't want to use second array (they are can be

Combine directories

2005-04-07 Thread Debbie Cooper
John W. Krahn wrote: It doesn't look THAT great. You're right John. I probably used my limited knowledge of Perl and a lot of books to redo this script so that it worked exactly the way I wanted. But, it works great for me! I do appreciate your correcting the syntax though. It helps in

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
I'm sorry, as I can see I have explained incorrectly a problem. In main() function I have an array (not the array reference). But function print_array() takes a reference to a part of array. I want to give to print_array() function a reference to a part of array. Array and that part of array may b

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
John Doe wrote: Am Donnerstag, 7. April 2005 14.54 schrieb Vladimir D Belousov: Hallo, all! Hi Wim has already presented the solution for your problem; [...] I do this: $#array = $N+100; print_array($array[$N]); this should be print $array->[$N] I see, but $array here is unde

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Jay Savage
On Apr 7, 2005 8:54 AM, Vladimir D Belousov <[EMAIL PROTECTED]> wrote: > Hallo, all! > > I have a function which prints array: > > sub print_array { > my $array_ref = shift; > for(@$array_ref){ > print "$_\n"; > } > } > > And I have a big array, for example named @array. > I want to p

Re: functionality of .pl from .pm

2005-04-07 Thread Xavier Noria
On Apr 6, 2005, at 12:22, lohit wrote: i have a strange requirement where in i have certain functionality to be achieved by calling a perlscript. say script.pl but i also have to seperate these functionalities in a module script.pm A different thread today reminded me that caller() could be useful

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread John Doe
Am Donnerstag, 7. April 2005 14.54 schrieb Vladimir D Belousov: > Hallo, all! Hi Wim has already presented the solution for your problem; [...] > I do this: > $#array = $N+100; > print_array($array[$N]); this should be print $array->[$N] because you have to dereference the arrayref first

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Peter Rabbitson
> But this operation means copying an array? Even at return the result > from function. > And if the array and/or length are very big, it will take a long time > and CPU usage. > Or I am wrong? > The gurus will correct me, but as far as I understand we do a splice on the initial array, take 10

RE: Combine directories

2005-04-07 Thread Debbie Cooper
Chris Devers asked: Why aren't you using rsync for this? Excellent question. It's because I'd never heard of rsync before. That's why I'm on this list. Because I learn something new everyday. I've since asked someone here who's familiar with that product to test it out for me and he said it w

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Peter Rabbitson
> don't want to use second array (they are can be very big). After print I > don't need @array anymore. > Erm... if you really don't need the array anymore, why don't you just deflate it by splicing on itself? @array = splice (@array, N, 100); Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED

How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
Hallo, all! I have a function which prints array: sub print_array { my $array_ref = shift; for(@$array_ref){ print "$_\n"; } } And I have a big array, for example named @array. I want to print @array elements from N to N+100 using this function, but don't want to use second array (they are

Selected STDOUT redirection to multiple files in PERL

2005-04-07 Thread Ambikesh Chaurasia
Hi Guys, I am calling 2 programs from my perl script. Output of these program is being displayed in STDOUT. I want to display this outout in STDOUT as well as want to log output of each program in separate files. How to do this? In order to do above, I tried following program: #!/usr/bin/perl -w

Can't understand error

2005-04-07 Thread Olivier, Wim W
Hi all, I get an error running this script on Win32 , but when I execute the actual command it works 100%. Does anyone see my problem here? The error I get is: "Error: Invalid message text." The debugger goes through fine, but complains at the 'system()' line. notify_jcc("user", "err", "THI

RE: Which script called require?

2005-04-07 Thread Charles K. Clarkson
Ankur Gupta wrote: : I just want to know who called require.file in the require.file : script. It looks like you need the built-in caller() function. a.pl: #!/usr/bin/perl use strict; use warnings; use lib '.'; require 'aa.pl'; __END__ aa.pl: #!/usr/bin/perl

Re: Newbie Regular expression question

2005-04-07 Thread N. Ganesh Babu
Dear John, Thank you very much for you help. One more small help. fourth string B. van Sures to be tagged as B.van Sures fifth string van Sures, B., to be tagged as van SuresB. sixth string Bockris, O. M. J., to be tagged as BockrisO. M.J. All 6 should be converted in a single regex. Regards, G

Re: Net::SSH::Perl bind socket problem

2005-04-07 Thread John Doe
Am Dienstag, 5. April 2005 15.20 schrieb gui: [snip] > Net::SSH: Can't bind socket to port 1023: Adresse déjà utilisée at > ./test_ssh.pl line 50 There's also a mailing list dedicated to Net::SSH::Perl (from man page): "SUPPORT For samples/tutorials, take a look at the scripts in eg/ in th

Re: Converting a retruned string value to a number

2005-04-07 Thread Manish Sapariya
Hello, Thanks for all your replies. This however does not work for me OR I dont understand the problem I encountered. This is the exact error that I encouter when running my perl code. -- Argument "XML::XPath::Node::Element=REF(0x86c31c8)->findvalue('loo..." isn't numeric in numeric eq

Re: Converting a retruned string value to a number

2005-04-07 Thread Manish Sapariya
Hello everybody, Thanks for all the help. I got it working. My xml file was not properly consturcted and hence the problem. Has nothing to do with the conversion. Sorry for the noise created. Thanks and Regards, Manish P.S. : I observe that my mail message dont appear immediately in the newgroup. I

Re: Converting a retruned string value to a number

2005-04-07 Thread Manish Sapariya
Hello, I searched throught perldoc XML::Xpath and here what it has to say: findvalue($path, [$context]) Returns either a "XML::XPath::Literal", a "XML::XPath::Boolean" or a "XML::XPath::Number" object. If the path returns a NodeSet, $no

Re: Is this allowed?

2005-04-07 Thread Offer Kaye
On Apr 7, 2005 6:33 AM, Bill Evans wrote: > > In this scenario, I have a text file, the first line of which contains a bank > account number and > opening balance. The second line contains records of checks drawn on the > account. The last > line contains a zero amount. Im trying to code a scr