RE: Wide character in print?

2005-04-05 Thread Johnstone, Colin
Thanks John, For the explanation I have done some debugging myself since posting, the character in question turned out to be a hyphen that one of our content producers had cut and paste from a word doc into our cms. Regards Colin -Original Message- From: John W. Krahn [mailto:[EMAIL PRO

Re: Wide character in print?

2005-04-05 Thread John W. Krahn
Johnstone, Colin wrote: Gidday all, Hello, What does this error mean please? ?? I assume that you mean the Subject line? perldoc perldiag [snip] Wide character in %s (W utf8) Perl met a wide character (>255) when it wasn't expecting one. This warning is by default on for I/

Wide character in print?

2005-04-05 Thread Johnstone, Colin
Gidday all, What does this error mean please? ** Colin Johnstone Independent Interwoven Teamsite Analyst Programmer (Contractor) eGovernment Delivery Team Department of Employment and Training Phone (07) 3244 6268 Fax (07) 3244 6265 Email Colin.

Re: Regular expression $1,$2,$3 ... in array ?

2005-04-05 Thread John W. Krahn
Michael Gale wrote: Hello, Hello, I have the following input as an example: $_ = < Now, if I run this following regular expression against it: /output:.*DISK.*-.free.space:.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)% \):.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)%\):/ So two

Re: initialize arrays

2005-04-05 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Are these two statements the same? my (@array, @array1) = ( ); my @array = my @array1 = ( ); $ perl -le' my $x = q/my (@array, @array1) = ( );/; my $y = q/my @array = my @array1 = ( );/; print "These two are ", $x eq $y ? "" : "NOT ", "the same."; ' These two are NOT the sa

Re: datetime comparisons

2005-04-05 Thread John W. Krahn
John wrote: hello all Hello, i am wondering a there is a module that do comparisons between two different datetime stamps for example 2/4/2005:15:20:20 and 4/4/2005:12:09:23 which date is bigger (namely earliest) Probably the easiest way is to convert them to comparable strings: my ( $date1, $date2

Perl Socket Client for C++ Server

2005-04-05 Thread news-funsi
Hi there, i have written a socket c++ server, which listens for clients and understands some commands. here the structs of the server commands: enum command { SET_PRIO, CLEAR, SEND_STRING, SET_CURSOR, SHOW_CURSOR }; struct string_packet_t { char str[DATA_LENGTH]; };

Re: Regular expression $1,$2,$3 ... in array ?

2005-04-05 Thread Offer Kaye
On Apr 5, 2005 5:53 PM, Michael Gale wrote: > > So two questions, > > 1. I can simplify the above regexp by using groups correct ? > /output:.*DISK.*-.free.space:(.(\S+).*MB.\((\d+)%\):){1,}/ > Yes, you can simplify by using groups, but there's something wrong with both your REs, IMHO. What ex

Re: initialize arrays

2005-04-05 Thread Offer Kaye
On Apr 5, 2005 4:29 PM, Larsen, Errin M HMMA/IT wrote: > > Hi everyone, > > this one made me wonder. Isn't there a way to get Perl to print out > exactly how it evaluates the statements that are written? Sure - the B modules, such as B::Debug and B::Concise. > If so, we > could use that to

Re: XML::XPath query

2005-04-05 Thread Jesper Krogh
I gmane.comp.lang.perl.beginners, skrev Manish Sapariya: > my $doc = XML::XPath-> new(xml=>$xml); > > my @agents = $doc-> findnodes('//Agent'); > > foreach my $agent (@agents) { > print $agent-> findvalue('TelephoneNumbers/TelephoneNumber'), "\n"; > } This seems to work here:

Regular expression $1,$2,$3 ... in array ?

2005-04-05 Thread Michael Gale
Hello, I have the following input as an example: $_ =

Re[2]: datetime comparisons

2005-04-05 Thread John
From: Peter Rabbitson <[EMAIL PROTECTED]> To: beginners@perl.org Date: Tuesday, April 5, 2005, 5:03:09 PM Subject: datetime comparisons Tuesday, April 5, 2005, 5:03:09 PM, you wrote: > On Tue, Apr 05, 2005 at 04:12:31PM +0300, John wrote: >> hello all >> >> i am wondering a there is a mod

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

2005-04-05 Thread gui
added debug in the params. Can't find any real clue on what to do though, here's what I got : ubuntu: Reading configuration data /home/gui/.ssh/config ubuntu: Reading configuration data /etc/ssh_config ubuntu: Allocated local port 1023. ubuntu: Connecting to 192.168.0.1, port 22. ubuntu: Remote p

Re: Installing Downloaded Modules from CPAN

2005-04-05 Thread Felix Geerinckx
On 05/04/2005, Joel Divekar wrote: > I am using Activestate Perl Ver 5.8.4 under Windows 2k > and due to firewall I am not able to install packages > using ppm / ppm3. Open your ActivePerl HTML documentation and locate PPM in the "ActivePerl Components" section of the TOC. Scroll down to the "PP

XML::XPath query

2005-04-05 Thread Manish Sapariya
Hi List, I doing XML for the first path and got the things as I wanted using XPath. However only one thing I cannot figure out is how do I get Telephone number in a separate list. What the module returning to me is concatenated list of Telephone number and I have to add extra delimiter " " (space)

Re: initialize arrays

2005-04-05 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: I am just playing with variable assign. I always initialize my arrays first as I need them. Then of your two examples this makes the most sense; my(@array,@array1); but if you are simply doing: my( @array, @array1 ); @array = foo(); @array1 = bar(); then it'd be much bett

RE: initialize arrays

2005-04-05 Thread Larsen, Errin M HMMA/IT
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 05, 2005 9:24 AM > To: Charles K. Clarkson > Cc: beginners@perl.org > Subject: RE: initialize arrays > <> > [EMAIL PROTECTED] wrote: > > : Are these two statements

RE: initialize arrays

2005-04-05 Thread DBSMITH
I am just playing with variable assign. I always initialize my arrays first as I need them. thanks, Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Charles K.

RE: initialize arrays

2005-04-05 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : Are these two statements the same? : : my (@array, @array1) = ( ); : : my @array = my @array1 = ( ); According to Data::Dumper the results are the same. print Dumper [EMAIL PROTECTED], [EMAIL PROTECTED]; But then this has the same

RE: 1 at end of script

2005-04-05 Thread Peter Scott
On Sun, 03 Apr 2005 14:45:55 -0500, Dave Kettmann wrote: > Nevermind I *just* figured it out. It is the exit code. Oops :) It just occurred to me that perhaps by 'exit code' you meant 'return value of the subroutine' instead of what 'exit code' normally means, the exit code of the script, in which

RE: 1 at end of script

2005-04-05 Thread Peter Scott
On Sun, 03 Apr 2005 14:45:55 -0500, Dave Kettmann wrote: > Nevermind I *just* figured it out. It is the exit code. Oops :) No it isn't. It is the result of printing the return value of a subroutine whose last expression evaluated is a print() statement. >> $action = param('action'); >> if (

Re: datetime comparisons

2005-04-05 Thread Peter Rabbitson
On Tue, Apr 05, 2005 at 04:12:31PM +0300, John wrote: > hello all > > i am wondering a there is a module that do comparisons > between two different datetime stamps > > for example > > 2/4/2005:15:20:20 and 4/4/2005:12:09:23 > > which date is bigger (namely earliest) > I was down this road so

Re: initialize arrays

2005-04-05 Thread John Doe
Am Dienstag, 5. April 2005 15.32 schrieb [EMAIL PROTECTED]: > Are these two statements the same? > > my (@array, @array1) = ( ); > > my @array = my @array1 = ( ); let's try: $ perl use strict; use warnings; my (@array, @array1) = ( ); my @brray = my @brray1 = (); print @array ? 1 : 0,"\n"; prin

RE: datetime comparisons

2005-04-05 Thread Moon, John
Subject: datetime comparisons hello all i am wondering a there is a module that do comparisons between two different datetime stamps for example 2/4/2005:15:20:20 and 4/4/2005:12:09:23 which date is bigger (namely earliest) You may wish to look at "Time::Local". This will convert the string

initialize arrays

2005-04-05 Thread DBSMITH
Are these two statements the same? my (@array, @array1) = ( ); my @array = my @array1 = ( ); Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

datetime comparisons

2005-04-05 Thread John
hello all i am wondering a there is a module that do comparisons between two different datetime stamps for example 2/4/2005:15:20:20 and 4/4/2005:12:09:23 which date is bigger (namely earliest) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Installing Downloaded Modules from CPAN

2005-04-05 Thread Joel Divekar
Hi All I am using Activestate Perl Ver 5.8.4 under Windows 2k and due to firewall I am not able to install packages using ppm / ppm3. I have checked following doc but no luck. Please advice. I am sorry if this point was discussed earlier. http://www.cpan.org/modules/INSTALL.html Regards Joel Mu

Re: Newbie Regular expression question

2005-04-05 Thread John W. Krahn
N. Ganesh Babu wrote: Dear All, Hello, I have to convert these lines into individual part of name information with a single regular expression. Input: B. E. Conway, J. O. M. Bockris B. Conway Output: B.E.Conway J.O. M. Bockris B. Conway Can anybody help me in getting the single regular expressi

Newbie Regular expression question

2005-04-05 Thread N. Ganesh Babu
Dear All, I have to convert these lines into individual part of name information with a single regular expression. Input: B. E. Conway, J. O. M. Bockris B. Conway Output: B.E.Conway J.O. M. Bockris B. Conway Can anybody help me in getting the single regular expression. Thanks for the help. Rega

Re: This is weird: Pop works but shift doesn't

2005-04-05 Thread N. Ganesh Babu
Dear All, I have to convert these lines into individual part of name information with a single regular expression. Input: B. E. Conway, J. O. M. Bockris B. Conway Output: B.E.Conway J.O. M. Bockris B. Conway Can anybody help me in getting the single regular expression. Thanks for the help. Rega

Re: This is weird: Pop works but shift doesn't

2005-04-05 Thread John W. Krahn
Harold Castro wrote: Hi, Hello, I'm parsing a log file that contains this format: 1112677214 31388202 181264589 1112677214 8843 59460 8843 59460 1112676919 10728 59045 10728 59045 1112676900 10617 59006 10728 59045 1112676600 8693 58389 9531 59661 These logs are in unix timestamp format: I'm tryin