Re: perl POE

2004-07-13 Thread Anish Mehta
Ricardo SIGNES wrote: * Anish Mehta <[EMAIL PROTECTED]> [2004-07-07T04:49:30] Does anyone knows about some good links on PERL POE, how it allows Perl code to make asynchronous, non-blocking I/O calls and handle those I/O calls on the basis of Event Driven model and Event Queues. poe

2 Socket questions

2004-07-13 Thread Kelvin Wu
hello, 1, how to use http 1.1 via IO::Socket? 2, if i have a script like this: &connectserver(); &answerserver(); &closeserver (); how to do a parallel processing while waiting for server response? use fork? thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: sub naming conventions

2004-07-13 Thread Randy W. Sims
On 7/13/2004 8:34 PM, perl.org wrote: There is still a question here - is there any convention difference between local sub names (in the script) and sub names in modules? I guess I can always name my local subs lsWhatever if there is no established convention. Naw, method names are dem dar thangs

Re: sort of previously ask, but it really a newie

2004-07-13 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTECTED]> Sent: Tuesday, July 13, 2004 6:13 PM Subject: sort of previously ask, but it really a newie > All, > > the data below is my end result from my code below, but I am wondering and > trying to

Re: sub naming conventions

2004-07-13 Thread perl.org
On Tue, 13 Jul 2004 19:17:06 -0500, Wiggins d'Anconia wrote > > Which particular style you happen to choose is less important, than > being consistent with it all the way through your programming. Good because according to that perldoc I am following about 10% of convention (though it is pretty

RE: printing 10 scalers/elements

2004-07-13 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : : "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote : : All, : : Could you please explain line by line what this code : is doing below from Charles? Sorry it took so long. I must have missed this one. : : use strict; : : use warnings; : : : : use

Re: sub naming conventions

2004-07-13 Thread Wiggins d'Anconia
perl.org wrote: On Tue, 13 Jul 2004 18:57:57 -0500, James Edward Gray II wrote perldoc perlstyle Thanks. I had done perldoc perl | find /i "nam" but didn't see anything that looked relevant. The people that maintain Perl apparently have a very different mindset than I do... Which particular styl

Re: sub naming conventions

2004-07-13 Thread perl.org
On Tue, 13 Jul 2004 18:57:57 -0500, James Edward Gray II wrote > > perldoc perlstyle Thanks. I had done perldoc perl | find /i "nam" but didn't see anything that looked relevant. The people that maintain Perl apparently have a very different mindset than I do... -- To unsubscribe, e-mail: [EM

Re: sub naming conventions

2004-07-13 Thread James Edward Gray II
On Jul 13, 2004, at 6:52 PM, perl.org wrote: Is there an established, documented best practice for naming subroutines in Perl? does it differ whether the subroutine is in a script or a module (I would like it to be clear in my scripts whether I am expecting something local or packaged). I have

sub naming conventions

2004-07-13 Thread perl.org
Is there an established, documented best practice for naming subroutines in Perl? does it differ whether the subroutine is in a script or a module (I would like it to be clear in my scripts whether I am expecting something local or packaged). I have seen at least: some_function() someFunction()

cmd prompt = success in perl?

2004-07-13 Thread Trina Espinoza
Does getting a return cmd prompt equate to a successfully run script? My perl script runs everything correctly, but when the script finishes I see a mix of results. Sometimes it returns to the command prompt, sometimes I get a delayed cmd prompt (takes a minute or so to return), and sometimes I

sort of previously ask, but it really a newie

2004-07-13 Thread DBSMITH
All, the data below is my end result from my code below, but I am wondering and trying to find a better way to print this from an array that may be populated with only 1 element or 39 elements? as you can see there is only 18 elements, but I cannot have 39 print lines if an array is not popul

RE: Proc::Fork

2004-07-13 Thread Bob Showalter
Bob Showalter wrote: > You want to have some communication between the > children and the parents so the child can tell the parent when he's > ready to receive the next message. Here's an example using a pipe for the children to signal the parent: #!/usr/bin/perl use strict; use IO:

RE: Proc::Fork

2004-07-13 Thread Bob Showalter
Michael Gargiullo wrote: > I receive an error while running this script. It goes an gets a list > of > IP addresses that are on the network, then collects SNMP data from > them. > ... > When the script is run I see this output: > > ... > Can't locate object method "writer. via package "IO::Pipe

Re: Global and Local variables issue

2004-07-13 Thread Gunnar Hjalmarsson
Christopher L Hood wrote: Ok what I have is 3 variables assigned in the global block using my then when I try to use those variables later in a subroutine I get an error. The error is below: Error during compilation of /usr/local/rt3/local/html/cgi-bin/aupsearch.cgi: Variable "$ip" will not stay s

RE: [The Subroutine...revisited] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
I have seen null values come up, but when I do this same query in SQL Plus (Oracle environment BTW), I am getting no null values. Ed Christian <[EMAIL PROTECTED]> wrote:jason corbett wrote: > Here is what I am doing. I shortend the sub, using local variables, > and simplifying the whole thing to

Proc::Fork

2004-07-13 Thread Michael Gargiullo
I receive an error while running this script. It goes an gets a list of IP addresses that are on the network, then collects SNMP data from them. There are 8 modems available. 10.100.254.255 10.100.254.252 10.100.255.252 10.100.253.255 10.100.255.254 10.100.255.253 10.100.255.251 10.100.254.254 1

RE: [The Subroutine...revisited] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread Ed Christian
jason corbett wrote: > Here is what I am doing. I shortend the sub, using local variables, > and simplifying the whole thing to just print to screen. I use your > loop once I collect the records into the @record variable and join > them with ","... > > Still to no avail, that menacing warning s

Re: [The Subroutine...revisited] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread William . Ampeh
$recordlist=join(",",@record); #This statement is causing the problem Have you tried to see if there are any blank records in @record? __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: [The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
Use of uninitialized value in concatenation (.) or string at select_c.pl line 70 and error Use of uninitialized value in join or string at select_c.pl line 65. are whats showing up [EMAIL PROTECTED] wrote: What about manually stepping through the array elements? That is: for ( my $i = 0; $i

Re: [The Subroutine...revisited] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
Here is what I am doing. I shortend the sub, using local variables, and simplifying the whole thing to just print to screen. I use your loop once I collect the records into the @record variable and join them with ","... Still to no avail, that menacing warning stays. Thanks. my $sql=qq( s

Global and Local variables issue

2004-07-13 Thread christopher . l . hood
Ok what I have is 3 variables assigned in the global block using my then when I try to use those variables later in a subroutine I get an error. The error is below: Error during compilation of /usr/local/rt3/local/html/cgi-bin/aupsearch.cgi: Variable "$ip" will not stay shared at /usr/local/rt3/l

Re: [The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread William . Ampeh
What about manually stepping through the array elements? That is: for ( my $i = 0; $i < $#record; $i++) { print "$record[$i],"; } print "$record[$#record]\n"; __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: [The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread William . Ampeh
What about manually stepping through the array elements? That is: for ( my $i = 0; $i < $#record; $i++) { print "$record[$i],"; } print "$record[$#record]\n"; __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: [The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
I used ---print OUTFILE join(",",@record), "\n";--- that you suggested and still got the error. sub data_collect {unless (open(OUTFILE,">$fourdayreport")) {die open(ERRORLOG, ">>$errorlog") && print ERRORLOG "Sorry file $dayreport couldn't be created\n"; return "Failed";}

Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
> > Jan Eden wrote: > > Tim McGeary wrote on 13.07.2004: > > > > > >>Wiggins d Anconia wrote: > >> > >Sort of. What I don't understand is why do you have to decide on > >the server side, post-request that the result will be in a new > >window? Couldn't the original "portal" page jus

Re: My (variable) versus Our (variable)! Please explain the necessity for use....

2004-07-13 Thread Gunnar Hjalmarsson
Jason Corbett wrote: Hello folks. I am very thankful for all the help that I am getting here. The only thing is when I get some suggestions, I don't normally get the "whys" along with it. One in particular is use of "my" to assign variables, versus using "our". http://perl.plover.com/FAQs/Names

Re: use module only if it exists

2004-07-13 Thread Ramon Chavez
I forgot to mention my $IMAGE_SIZE=eval{require Image::Size}; ... if ($IMAGE_SIZE) { my ($x, $y) = Image::Size::imgsize($imagen); ###Call the function with the module }else{ ### More code ### Runs if it's not installed } -rm- - Original Message - From: "Ramon Chavez" <[E

Re: [The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread William . Ampeh
sub data_collect {unless (open(OUTFILE,">$fourdayreport")) {die open(ERRORLOG, ">>$errorlog") && print ERRORLOG "Sorry file $dayreport couldn't be created\n"; return "Failed";} else{ while( @record = $sth->fetchrow_array() ) { # no warnings; #INSERTED ::: #Since y

My (variable) versus Our (variable)! Please explain the necessity for use....

2004-07-13 Thread jason corbett
Hello folks. I am very thankful for all the help that I am getting here. The only thing is when I get some suggestions, I don't normally get the "whys" along with it. One in particular is use of "my" to assign variables, versus using "our". Until I can get a Perl scripting class to take, I am te

Re: use module only if it exists

2004-07-13 Thread Ramon Chavez
Hi. This may be not a high enlightened answer but has solved me some time looking for an answer to a question like yours: my $IMAGE_SIZE=eval{require Image::Size}; ... if ($IMAGE_SIZE) { ### Some code ### Runs only if Image::Size is installed }else{ ### More code ### Runs if it's not

RE: creating a table in Microsoft Word

2004-07-13 Thread Tim Johnson
One easy way with Win32::OLE is to create the table while recording a macro in Word, and then convert the macro to Perl. -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 10:47 AM To: [EMAIL PROTECTED] Subject: Re: creating a table in Micros

Re: use module only if it exists

2004-07-13 Thread perl.org
On Tue, 13 Jul 2004 12:59:06 -0500, JupiterHost.Net wrote > I know of a module that is almost done with that has a function called Thanks, but unfortunately I'm working on a very restricted system (not being able to install custom modules on the production platform is actually the issue I'm facing

Re: use module only if it exists

2004-07-13 Thread Randy W. Sims
perl.org wrote: I want my code to call some subroutines in a custom module only if that module exists on the system. I can think of at least three techniques to determine if the module exists: scan @INC, use UNIVERSAL::can (not sure that would work), or put the code in an eval block. What is the

[The Subroutine] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
Thanks all for the feedback on the WARNING message that I am getting. I know that I can turn warning off at that moment of code, but I want to know for my own knowledge what is the warning all about. So, here is the entire sub routine. NOTE** I declared @records as a global earlier.. JC sub

Re: use module only if it exists

2004-07-13 Thread JupiterHost.Net
perl.org wrote: I want my code to call some subroutines in a custom module only if that module exists on the system. I can think of at least three techniques to determine if the module exists: scan @INC, use UNIVERSAL::can (not sure that would work), or put the code in an eval block. What is the

Re: creating a table in Microsoft Word

2004-07-13 Thread Jenda Krynicky
From: "gripman7" <[EMAIL PROTECTED]> > Does anyone know how to access Microsoft Word and create a table? > > Henri > [EMAIL PROTECTED] Take a look at Win32::OLE. It will allow you to start an (invisible) instance of Word and control it. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz

use module only if it exists

2004-07-13 Thread perl.org
I want my code to call some subroutines in a custom module only if that module exists on the system. I can think of at least three techniques to determine if the module exists: scan @INC, use UNIVERSAL::can (not sure that would work), or put the code in an eval block. What is the best solution?

Re: new window on redirect

2004-07-13 Thread Tim McGeary
Jan Eden wrote: Tim McGeary wrote on 13.07.2004: Wiggins d Anconia wrote: Sort of. What I don't understand is why do you have to decide on the server side, post-request that the result will be in a new window? Couldn't the original "portal" page just use targets like normal? It's a database drive

Re: new window on redirect

2004-07-13 Thread Jan Eden
Tim McGeary wrote on 13.07.2004: >Wiggins d Anconia wrote: > Sort of. What I don't understand is why do you have to decide on the server side, post-request that the result will be in a new window? Couldn't the original "portal" page just use targets like normal? >>> >>>It's a data

Proc::Fork

2004-07-13 Thread Michael Gargiullo
I receive an error while running this script. It goes an gets a list of IP addresses that are on the network, then collects SNMP data from them. There are 8 modems available. 10.100.254.255 10.100.254.252 10.100.255.252 10.100.253.255 10.100.255.254 10.100.255.253 10.100.255.251 10.100.254.254 1

Re: Regex for numbers and text

2004-07-13 Thread Jeff 'japhy' Pinyan
On Jul 13, Gunnar Hjalmarsson said: >Jeff 'Japhy' Pinyan wrote: > >> /(-?(?=.?\d)\d*\.?\d*)/ > >I disagree. > >- It has almost as many characters. >- It's more difficult to read/understand. >- It's slower (see benchmark below). Aww, shucks. Fine. My attempts have failed. -- Jeff "japhy" Pin

Re: Regex for numbers and text

2004-07-13 Thread Gunnar Hjalmarsson
Randy W. Sims wrote: Gunnar Hjalmarsson wrote: use warnings; use Regexp::Common 'number'; $_ = '.'; /^$RE{num}{real}$/ and print "\"$_\" is a number.\n"; my $x = 1 if $_ < 5; Outputs: "." is a number. "." isn't numeric in numeric lt (<) at ... Regexp::Common considers an alone d

Re: Regex for numbers and text

2004-07-13 Thread Gunnar Hjalmarsson
Jeff 'Japhy' Pinyan wrote: I've seen the response of /-?(?:\d+\.?\d*|\.\d+)/, and while that does work, it seems too noisy to me. What we would really like to be able to say is /-?\d*\.?\d*/, but you should be able to see that could match "-." and "." and "", which we decided aren't legitimite num

Re: A simple text or GUI-based menu script

2004-07-13 Thread Mike Flannigan
> Subject: Re: A simple text or GUI-based menu script > Date: Sat, 10 Jul 2004 07:43:17 -0400 > From: zentara <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > > I have very little experience with getting Perl running on Windows. > But it seems it should run because it's pure perl. Proc::Killfam is >

Re: Reading a variable file name

2004-07-13 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Greetings, Hello, Would someone be kind enough to point me in the right direction to solve this problem? I'll try :) An application creates XML files in a subdirectory, which I then convert to EDI. That part is now working fine. My problem is that the application crea

Re: MIME coding & flags for sending a .csv or Excel file (Here is the code)

2004-07-13 Thread Randal L. Schwartz
> "Jason" == Jason Corbett <[EMAIL PROTECTED]> writes: Jason> our ($dbh); # Jason> our (@files); # Jason> our ($filename); # Jason> our ($errorlog); #logs all successes and failures of the report Jason> our ($dirfolder); #where the treatment report is sent prior to emailing Jason> our (@reco

Re: What is "Use of uninitialized JOIN" error?

2004-07-13 Thread William . Ampeh
Where do you populate @record? Such messages occur when populating an array with contents of a file (if the file contains a bunch of newlines). So make sure you know what the array is getting populated with by testing. Also, you want to join before printing, correct? So swap the lines (but

RE: What is "Use of uninitialized JOIN" error?

2004-07-13 Thread Jackson, Jonah
Hard to tell for certain from that snippet, but I'd say @record is a null value in your execution for one reason or another (i.e. there is nothing stored in that array) so when it tries to execute the join, there is no list for the second argument to the "join" function. In handling it, you nee

Re: What is "Use of uninitialized JOIN" error?

2004-07-13 Thread Jeff 'japhy' Pinyan
On Jul 13, jason corbett said: >Here is the part of the code that the error is pointing to > > print OUTFILE "$recordlist\n"; >$recordlist=join(",",@record); It's not an error, it's a warning. And you didn't give us the *actual* text of the warning. It looks to me like the problem is you're usi

Re: new window on redirect

2004-07-13 Thread Tim McGeary
Wiggins d Anconia wrote: Sort of. What I don't understand is why do you have to decide on the server side, post-request that the result will be in a new window? Couldn't the original "portal" page just use targets like normal? It's a database driven site and so, unfortunately, it is all server s

RE: new window on redirect

2004-07-13 Thread Thomas Bätzler
Tim McGeary <[EMAIL PROTECTED]> asked: > > Sort of. What I don't understand is why do you have to decide on the > > server side, post-request that the result will be in a new window? > > Couldn't the original "portal" page just use targets like normal? > It's a database driven site and so, unfor

What is "Use of uninitialized JOIN" error?

2004-07-13 Thread jason corbett
Can anyone tell me what is happening here? Thanks, JC Here is the part of the code that the error is pointing to print OUTFILE "$recordlist\n"; $recordlist=join(",",@record);

Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
Please group reply so others can help and be helped. > Wiggins d Anconia wrote: > > Please bottom post... > > I hate bottom posting... but alas... scroll down. :) > Yes but it makes it easier to follow (you can always snip so as not to force a long scroll) > >>Sorry, I didn't mean to no

Re: new window on redirect

2004-07-13 Thread Tim McGeary
Wiggins d Anconia wrote: Please bottom post... I hate bottom posting... but alas... scroll down. :) Sorry, I didn't mean to not include everyone on my reply... The reason I need a new window (and I did actually mean _blank), is because this is for a Library portal site which has a limited windo

Re: garbage errors when number of characters in script exceeds some number

2004-07-13 Thread Ken Rearick
I discovered last night that if I eliminate the switch statements the problem go away. This morning I also tried moving the use switch in side the if blocks containing the switch statements. This also eliminated the problem. "Ken Rearick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED

Re: MIME coding & flags for sending a .csv or Excel file (Question)

2004-07-13 Thread jason corbett
Thanks John. This was my first PERL program that I wrote and I wasn't sure when to use the my vs the our, but your points are well respected. I need more practice to understand how the functions/script work so that I can condense the programming better. Question: Is the scalar function always

Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
Please bottom post... > Sorry, I didn't mean to not include everyone on my reply... > > The reason I need a new window (and I did actually mean _blank), is > because this is for a Library portal site which has a limited window > view. Our users actually (almost) demand a new window because the

Re: new window on redirect

2004-07-13 Thread Tim McGeary
Sorry, I didn't mean to not include everyone on my reply... The reason I need a new window (and I did actually mean _blank), is because this is for a Library portal site which has a limited window view. Our users actually (almost) demand a new window because they don't want to have to hit their

Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
> I want my web page redirect to open in a new window, as if I were > putting "target=_new" in the html of the URL. How can I do that using > CGI.pm's redirect? I have this: > > print $output->redirect($u) > > with $u being the URL I am redirecting, too. > The problem is that the redirect i

Re: new window on redirect

2004-07-13 Thread David Dorward
On 13 Jul 2004, at 14:37, Tim McGeary wrote: I want my web page redirect to open in a new window, as if I were putting "target=_new" in the html of the URL. Which isn't allowed under HTML. You are probably thinking of _blank. http://www.w3.org/TR/html4/types.html#h-6.16 How can I do that using CGI

Re: Reading a variable file name

2004-07-13 Thread James Edward Gray II
On Jul 13, 2004, at 8:31 AM, [EMAIL PROTECTED] wrote: Greetings, Howdy. Would someone be kind enough to point me in the right direction to solve this problem? I'll sure try. An application creates XML files in a subdirectory, which I then convert to EDI. That part is now working fine. My proble

new window on redirect

2004-07-13 Thread Tim McGeary
I want my web page redirect to open in a new window, as if I were putting "target=_new" in the html of the URL. How can I do that using CGI.pm's redirect? I have this: print $output->redirect($u) with $u being the URL I am redirecting, too. Thanks, Tim -- Tim McGeary [EMAIL PROTECTED] -- To u

Re: Permutations (and optimisations)

2004-07-13 Thread Ramprasad A Padmanabhan
Good effort. But I use *Algorithm::Permute* Thanks Ram Robin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I have written a function that maybe others will find useful to play with. It takes a list and then c

Reading a variable file name

2004-07-13 Thread RHug505456
Greetings, Would someone be kind enough to point me in the right direction to solve this problem? An application creates XML files in a subdirectory, which I then convert to EDI. That part is now working fine. My problem is that the application creates files during the day, with slightly dif

re:problem with regexp

2004-07-13 Thread Jeff 'japhy' Pinyan
On Jul 13, Goncalves, Jorge (Ext) said: >print "\n$DCICLIENTDIR\\logicalPMF.exe -f >$DCICLIENTDIR\\config$NOM_PMF.cfg\n"; > print ($_); >my $var1="$DCICLIENTDIR\\logicalPMF.exe -f >$DCICLIENTDIR\\config$NOM_PMF.cfg\n"; > my $line=($_); > if ($_ =~ m /$var1/) > { > $Ajout=0; > } >D:\muse\lotus\

Re: Regex for numbers and text

2004-07-13 Thread Jeff 'japhy' Pinyan
On Jul 11, Jeff 'japhy' Pinyan said: >I tend to write that as /(-?\d+\.?\d*)/, but be aware that this doesn't >match numbers like .52 or .9, because they don't have digits BEFORE the >decimal point. I've seen the response of /-?(?:\d+\.?\d*|\.\d+)/, and while that does work, it seems too noisy to

Permutations (and optimisations)

2004-07-13 Thread Robin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I have written a function that maybe others will find useful to play with. It takes a list and then calls a specified function on that list. I'm wondering if anyone knows of anything to optimise the code, as there are a few list copies going on

re:problem with regexp

2004-07-13 Thread Goncalves, Jorge (Ext)
Hi list i have this snippet: $Ajout=1; while () { print "\n$DCICLIENTDIR\\logicalPMF.exe -f $DCICLIENTDIR\\config$NOM_PMF.cfg\n"; print ($_); my $var1="$DCICLIENTDIR\\logicalPMF.exe -f $DCICLIENTDIR\\config$NOM_PMF.cfg\n"; my $line=($_); if ($_ =~ m /$var1/) { $Ajout=0; } } althou

Re: Regex for numbers and text

2004-07-13 Thread Randy W. Sims
Gunnar Hjalmarsson wrote: Randy W. Sims wrote: Jerry Preston wrote: What needs to be changed in /(-?\d+\.?\d*)/ so that it also see number like .59? This is why I like to recommend Regexp::Common. But... use warnings; use Regexp::Common 'number'; $_ = '.'; /^$RE{num}{real}$/ and p

Re: Regex for numbers and text

2004-07-13 Thread Gunnar Hjalmarsson
Randy W. Sims wrote: Jerry Preston wrote: What needs to be changed in /(-?\d+\.?\d*)/ so that it also see number like .59? This is why I like to recommend Regexp::Common. But... use warnings; use Regexp::Common 'number'; $_ = '.'; /^$RE{num}{real}$/ and print "\"$_\" is a number.\n"

Re: memory allocation in perl

2004-07-13 Thread Randy W. Sims
Anish Mehta wrote: You'll need to be more specific. There is no explicit memory allocation in perl (well, actually, you can treat a string as a chunk of memory). What exactly do you want to know? Randy. I want to whether we have some sort of allocation method as we have in C where we have memo

Re: memory allocation in perl

2004-07-13 Thread Anish Mehta
You'll need to be more specific. There is no explicit memory allocation in perl (well, actually, you can treat a string as a chunk of memory). What exactly do you want to know? Randy. I want to whether we have some sort of allocation method as we have in C where we have memory allocated from h

Re: memory allocation in perl

2004-07-13 Thread Randy W. Sims
Anish Mehta wrote: Hello Everyone! I would like to have your consideration regarding my query. I want to know about the memory allocation of variables in perl.. You'll need to be more specific. There is no explicit memory allocation in perl (well, actually, you can treat a string as a chunk of me