Re: colon(:) in split --- what does it mean ?
Its not a split.its a substitute. What this snippet is doing is removing anything that follows a colon and a dot. Prachi. Original Message Follows From: pn <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: colon(:) in split --- what does it mean ? Date: Tue, 18 Jun 2002 08:45:25 -0700 (PDT) I came across this snippet of code, in somebody's old code. ($cellname = $split_cellname) =~ s/:.*//; I would like to understand the usage of this statement in general, but in particular, i would like to know the significance of of the colon(:) character in the split function. Thanks PN __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
power of
Hi! This may sound as a very stupid question, but here it comes anyways. Has anybody come across a function that wold calculate the power of a number, like the pow function in C. Simply, x to the power of y. I know of 2 options, one an inefficient iterative multiplication, but I have real numbers as power, so that is ruled out. Another is to do something like this: exp(y*log x), but is an approximation. So, please do let me know if there is any other more accurate way of doing it. Thanks, Prachi. _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with Math::CDF module
Hello everyone! I wanted to generate normally distributed data set with a given sample size. The easiest way to it will be to have a routine that calculates the quantiles for a normal distribution. The Math::CDF module does have what I want, but I am having problems installing it. The make gives me fatal errors which look like the following: LIB : fatal error LNK1181: cannot open input file "cr" NMAKE : fatal error U1077: 'lib' : return code '0x49d' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. I do not understand what that could mean. Also, in the ReadME file of the module it says that I should change a cdflib/ipmpar.c file where the integer machine constans are specified for different machines. I am using a Dell machine with Windows 2000 and Intel Xeon processor. I dont know what class of machines does mine fall in or if that is actually the problem. Can somebody help me with this? Thanks a lot! Prachi. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
spawn processes
Hi! I want to spawn multiple instances of one perl program from another perl program. I could do it with Win32::Process::Create or Win32::Spawn (this is deprecated). I am working on Windows 2000. Now, the problem is, to "Create" a child process which is a perl program, I have to convert it to an exe file. I tried doing that using "perl2exe" utility by Indigostar.com, the exe is generated and the parent is successful in spawning it, but the exe does not exit. Also, I am not able to pass command line arguments to the child process. When executed directly on the command prompt, the exe file does exit well and also accepts command line arguments. Any help or ideas are appreciated. Thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
running CGI on a stand alone machine
Hi, I have a perl script and designed a simple web page for its front end...but this package is running on a single machine and not connected to any server. when the form on the HTML page is submitted, it should run the perl script specified in the ACTION field of the form. Now, the problem is, when I submit the form it shows the code of the perl script instead of running the script and showing results. I think I am missing something..can anyone help? thanks, Prachi Below is the HTML code...am I missing something? New Page 1 The Automated Blast Page Please enter the file name of the query where all sequences are stored : Enter the list of species that you would want your search to focus : Enter the path of the folder where the results are to be stored : _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Web Page Interaction...
Hi, I have been something similar lately to what u want to do. Browsing thru webpages.filing out formsfollowing links on a page etc. LWP::UserAgent and HTTP::Request can be used to do that. I would suggest you take a look at "Web Client Programming with Perl by Clinton Wong - QReilly publishers " also, there's a chapter on Web Automation in the Perl Cookbook. Hope this helps. Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
javascript-detail
Hi folks, Well, I am actually implementing an LWP::UserAgent to walk through a website and do the things I want it to and get me the desired results(dont worry, this is a noble cause :-) ) and my problem is that there are some javascripts on that webpage which I need to execute thru my perl code.and I have not been able to find a way to do it. I do not have the code for those javascripts, all I know is the way they are called and run on the webpage. Hope this is clear enough. Can anyone come up with any clues now? thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
javascript
HI! Can anyone please give any clue of how to call and execute javascripts from perl? thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
HTML::PARSER
Hi, Can somebody please explain me wha exactly does the HTML::PARSER module do? like if I use the parse() methoddoes it return me all text after extracting all the HTML tags? I could not find a proper expalnation to it in any book or documentation online. thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
LWP modules
Hi folks, I have been trying to automate the travelling thru a webpagefilling out forms , submitting them and capturing their output using the LWP::UserAgent and LWP::RobotUA objects..there are some forms which execute a javascript on their SUBMIT button and the on executing them from my script it gives me an error that javascript is not supported like http, ftp or other protocols. Also, I have the option of using the website without javascript, where the same submittion is through a submit buttonso, how do I pass parameters to notigy a CGI script which is called on submittion of the form to submit it and generate the results. All this automation is done on a public website already in use since long. The above explanation is a little confusing, I hope some of you might be able to decipher it and help me. thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: system
It is a WIN machine and you are right, it needs a double backslash '\\' for the path and that is how I have spcefied. Also, the system command is invoked straight using the path as a string, no passing as array. Thanks, Prachi Original Message Follows From: "Brian P. Hanley" <[EMAIL PROTECTED]> To: "prachi shroff" <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: system Date: Thu, 7 Jun 2001 09:23:06 -0400 (EDT) A couple things could be happening here. How does the EXE being invoked by SYSTEM find the file it is trying to open? Are you using relative paths? If the file is on a WIN machine, you may need to double-back '\\' the path to the file so it can be found. Second, how are you invoking SYSTEM? Are you passing it an array with the arguments to execute? I have found it is sometimes easier to assemble a large command string and pass that in instead of the parsed out array form. --Brian --Original Message-- From: "prachi shroff" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Sent: June 7, 2001 1:15:37 PM GMT Subject: Re: system Its the exe which cannot open another fileand I have to use system and not exec, coz I need to get back to the script after executing the exe. So, the problem is, the exe has no problems opening the other file if run on the command prompt or by any other straight means, but if run within the perl script it shows errors. Also, I have run other exe from the same script and they work fine. Thanks, Prachi Original Message Follows---- From: Jean-Matthieu Guerin <[EMAIL PROTECTED]> To: prachi shroff <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: system Date: Thu, 07 Jun 2001 15:05:40 +0200 Hello, Is your perl script that can't open exe file or your exe that can't open another file ? - if perl can't open exe file: check that exe's path is defined on your PATH environment variable or if perl srcipt and exe are in same directory, check line SYSTEM("./myexe.exe") the ./ stands for current directory. or try another way than SYSTEM : exec, ` `, ... prachi shroff wrote: > > Hi, > > I am trying to run an executable file from within my perl script using the > SYSTEM command. If I run the exe from either the command line or by double > clicking, it works fine, but when I embed it into the perl script it gives > errors compiling. It is an exe of a C code and shows errors specific to the > code like "error opening a file" that it needs to read. > > Could anyone please give in any suggestions. > > Thanks, > Prachi -- Jean-Matthieu Guerin Brime Ingenierie [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com *** * Brian P. Hanley * Senior Consultant * Verity Professional Services * Ph: 757.547.9638 * Fx: 240.248.8902 * e-mail: [EMAIL PROTECTED] * http://www.verity.com *** _ Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: system
The path is correct, coz otherwise it would have problems opening the exe itself, but here it does start executing and shows errors doing so. thanks, Prachi Original Message Follows From: "Daryl Hoyt" <[EMAIL PROTECTED]> To: "prachi shroff" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: system Date: Thu, 7 Jun 2001 08:15:22 -0500 Hi, Make sure the path to your exe is correct. I had that problem before. > -----Original Message- > From: prachi shroff [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 07, 2001 8:01 AM > To: [EMAIL PROTECTED] > Subject: system > > > Hi, > > I am trying to run an executable file from within my perl script > using the > SYSTEM command. If I run the exe from either the command line or > by double > clicking, it works fine, but when I embed it into the perl script > it gives > errors compiling. It is an exe of a C code and shows errors > specific to the > code like "error opening a file" that it needs to read. > > Could anyone please give in any suggestions. > > Thanks, > Prachi > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: system
Its the exe which cannot open another fileand I have to use system and not exec, coz I need to get back to the script after executing the exe. So, the problem is, the exe has no problems opening the other file if run on the command prompt or by any other straight means, but if run within the perl script it shows errors. Also, I have run other exe from the same script and they work fine. Thanks, Prachi Original Message Follows From: Jean-Matthieu Guerin <[EMAIL PROTECTED]> To: prachi shroff <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: system Date: Thu, 07 Jun 2001 15:05:40 +0200 Hello, Is your perl script that can't open exe file or your exe that can't open another file ? - if perl can't open exe file: check that exe's path is defined on your PATH environment variable or if perl srcipt and exe are in same directory, check line SYSTEM("./myexe.exe") the ./ stands for current directory. or try another way than SYSTEM : exec, ` `, ... prachi shroff wrote: > > Hi, > > I am trying to run an executable file from within my perl script using the > SYSTEM command. If I run the exe from either the command line or by double > clicking, it works fine, but when I embed it into the perl script it gives > errors compiling. It is an exe of a C code and shows errors specific to the > code like "error opening a file" that it needs to read. > > Could anyone please give in any suggestions. > > Thanks, > Prachi -- Jean-Matthieu Guerin Brime Ingenierie [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com
system
Hi, I am trying to run an executable file from within my perl script using the SYSTEM command. If I run the exe from either the command line or by double clicking, it works fine, but when I embed it into the perl script it gives errors compiling. It is an exe of a C code and shows errors specific to the code like "error opening a file" that it needs to read. Could anyone please give in any suggestions. Thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
perl2exe
Hi! I am tying to use the Perl2exe utility but am getting an error : " Invalid Platform :win32 ". I am running Win2000 and installed the exact versions recommended for the Perl I am using. Any suggestions on this will be great help. Thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: substitution problem
Thanks! The method you suggested works, though it is not SIMPLE AND SWEET!! :-) Thanks, anyways. Prachi Original Message Follows From: "J. J. Horner" <[EMAIL PROTECTED]> To: prachi shroff <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: substitution problem Date: Tue, 29 May 2001 15:56:05 -0400 Is there any reason you chose not to do it this way: # From Perl Cookbook: open(TRY,"+< try.txt") or die "Couldn't open try.txt: $!\n"; my @lines =# Slurp all lines into an array. foreach my $line (@lines) { # Iterate through lines here. $line =~ s/windows/linux/g; # Modify lines here. } seek(TRY,0,0) or die "Error seeking file: $!\n"; print TRY @linesor die "Error writing to file: $!\n"; truncate(TRY,tell(TRY)) or die "Error truncating file: $!\n"; close(TRY) or die "Error closing file: $!\n"; It may not be as short and sweet, but it works, and it is easier to debug. JJ * prachi shroff ([EMAIL PROTECTED]) [010529 15:41]: > Hi again! > > I am having problems using the "s///" operator for substitution in of a > particular pattern in a specified file. > For eg. > > open(TRY,"+ while() > { > $_ =~ s/a/p/g; > } > > Is this the right way of doing it? And with what access mode shall I open > the file ( >> or +> or +< ) ? And is the while loop > fine? What happens with this code is this code itself gets written in > "try.txt" > > > Thanks, > Prachi > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com -- J. J. Horner "H*","6d6174686c696e40326a6e6574776f726b732e636f6d" *** Lure of the Mana Stone (http://www.lotms.com/) A Rom 2.4 Based MUD. *** "H*","6a6a686f726e65724062656c6c736f7574682e6e6574" Freedom is an all-or-nothing proposition: either we are completely free, or we are subjects of a tyrannical system. If we lose one freedom in a thousand, we become completely subjugated. << attach3 >> _ Get your FREE download of MSN Explorer at http://explorer.msn.com
substitution problem
Hi again! I am having problems using the "s///" operator for substitution in of a particular pattern in a specified file. For eg. open(TRY,"+) { $_ =~ s/a/p/g; } Is this the right way of doing it? And with what access mode shall I open the file ( >> or +> or +< ) ? And is the while loop fine? What happens with this code is this code itself gets written in "try.txt" Thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: run perl in Win 2000 ?
Thanks FOlks!! THe problem is solved after setting the PATH environment variable in the systems settings in the control panel. THanks a lot to all the suggestions everyone extended. regards, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re:run perl in win2000
Thanks! but the path is not configured on its own. When I run PERL from the command prompt, it does give me the COMMAND NOT FOUND error. What do I do then? Original Message Follows From: Joel Divekar <[EMAIL PROTECTED]> To: "prachi shroff" <[EMAIL PROTECTED]> Subject: Re: run perl in Win 2000 ? Date: Tue, 29 May 2001 10:49:34 +0530 Hi Prachi I am also new to perl but no problem I can help you on this. If you have any more queries then don't hesitate At 02:18 PM 5/28/2001 -0400, you wrote: Hi, I have WIN 2000 installed and have just started programming perl. Can somebody tell me how to set the PATH for the bin folder for the PERL executable? The #! operator does not work. This is not required under windows. When you installed perl the path was configured accordingly. To test this go to dos prompt from windows (run cmd) now at the prompt type perl and then press enter. if command not found error is not displayed then Perl is properly installed #! line is ignored as rem statement under windows, this line is very important under unix as the program has to know the path where perl is located. But if you want your code to work fine on both win and unix platform then please include the following #!/usr/bin/perl -w and don't forget '-w' Thanks, Prachi Regards Joel _ Get your FREE download of MSN Explorer at http://explorer.msn.com
run perl in Win 2000 ?
Hi, I have WIN 2000 installed and have just started programming perl. Can somebody tell me how to set the PATH for the bin folder for the PERL executable? The #! operator does not work. Thanks, Prachi _ Get your FREE download of MSN Explorer at http://explorer.msn.com