Re: arithmetic expression while substituting

2006-09-06 Thread Adriano Ferreira
On 9/6/06, Michael Alipio [EMAIL PROTECTED] wrote: I want to adjust the last two digits to less 1: perhaps something like this. s/\d+$/(regexp being lookup minus 1/ s/(\d+)$/$1-1/e is going to work, even though it is convoluted and not robust. For example, '06.00' will become '06.-1' --

Re: regular expression question

2006-09-06 Thread Adriano Ferreira
On 9/6/06, chen li [EMAIL PROTECTED] wrote: I need a regular expression to process some data but get stuck. I wonder if anyone here might have a clue. input: my $line='group A 1 2 3 4';# separated by space results: my @data=(group A ,1,2,3,4); You barely need a regular expression for

Re: How to write an integer to socket

2006-09-06 Thread Adriano Ferreira
On 9/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, guys In a udp socket test routine, I want to write some integers to server in network order. But unfortunately, my server receive just chars! how can I do? Take a look at 'perldoc pack' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: How to write an integer to socket

2006-09-06 Thread Adriano Ferreira
On 9/7/06, Adriano Ferreira [EMAIL PROTECTED] wrote: On 9/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, guys In a udp socket test routine, I want to write some integers to server in network order. But unfortunately, my server receive just chars! how can I do? Take a look at 'perldoc

Re: regular expression question

2006-09-07 Thread Adriano Ferreira
to advocate here. I will be more careful in the next posts. Adriano Ferreira. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: perl built in function for mean

2006-09-10 Thread Adriano Ferreira
On 9/10/06, Jen Spinney [EMAIL PROTECTED] wrote: On 9/10/06, Dr.Ruud [EMAIL PROTECTED] wrote: my$mean;mean+=$_/@data [EMAIL PROTECTED]; Don't you need another dollar sign? my$mean;$mean+=$_/@data [EMAIL PROTECTED]; Where is Rob to tell Dr. Ruud if one must test the code for him after he

Re: temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread Adriano Ferreira
On 9/12/06, JupiterHost.Net [EMAIL PROTECTED] wrote: I'm trying to change the behavior of a function (whose use of and call I have no control over) to avoid some nasty behavior in certain circumstances. Its easy enough to redefine it but after the hairy part is done I want to change it back.

Re: why Perl complaints my script

2006-09-28 Thread Adriano Ferreira
statement in the for is often used for declaring loop variables or, more generally, for loop initialization statements. If you don't have these initialization statements, you may omit it. Regards, Adriano Ferreira -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

<    1   2