Re: Gigantic file size processing error
Hi, Thanks for all your guidance, The Error was Perl Command Line Intepretar has encountered a problem and needs to close, Also increased the virtual memory, No use, My system configuration OS XP SP3 Intel Core 2 duo with 2 GB Ram. regards Manikandan N On Friday, 3 January 2014 9:06 PM, Janek Schleicher janek_schleic...@yahoo.de wrote: Am 02.01.2014 18:08, schrieb David Precious: Oh, I was thinking of a wrapper that would: (a) open a new temp file (b) iterate over the source file, line-by-line, calling the provided coderef for each line (c) write $_ (potentially modified by the coderef) to the temp file (d) finally, rename the temp file over the source file Of course, it's pretty easy to write such code yourself, and as it doesn't slurp the file in, it could be considered out of place in File::Slurp. I'd be fairly surprised if such a thing doesn't already exist on CPAN, too. (If it didn't, I might actually write such a thing, as a beginner-friendly here's how to easily modify a file, line by line, with minimal effort offering.) A short look to CPAN brings out https://metacpan.org/pod/File::Inplace what looks to do what OP wants. Honestly I never used, and it can be that it has also a performance problem, but for at least I looked to it's source code and it implements it via a temporary file without saving the whole file. Greetings, Janek -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Gigantic file size processing error
Hi, We have file size of huge size 500MB, Need to Manipulate the file, some replacement and then write the file, I have used File::slurp and works for file size of 300MB (Thanks Uri) but for this huge size 500MB it is not processing and come out with error. I have also used Tie::file module same case as not processing, any guidance. regards Manikandan
Re: Text Manipulation
Dear zavierz probably you can try this $I=~s/^(Article\s+[0-9]+\s+[\A-Z_a-z]+\S)/\\subsection*{$1}/g; print $I; --- On Sat, 5/2/11, zavierz zavi...@gmail.com wrote: From: zavierz zavi...@gmail.com Subject: Text Manipulation To: beginners@perl.org Date: Saturday, 5 February, 2011, 8:41 PM Hi, I am trying to modify a LaTex file which is plain text. The file contains lines similar to the following, but each line is followed by text, so that: Article 1 Cats Article 2 Dogs Article 3 Fish Article 4 Ferrets etc. I would like to modify the file so that each referenced line is changed as follows: \subsection*{Article 1 Cats} \subsection*{Article 2 Dogs} \subsection*{Article 3 Fish} \subsection*{Article 4 Ferrets} Here's code which was suggested to me, but when I execute it I'm returned to the command line and nothing happens: #!/usr/bin/perl s/^(Article\s+[0-9]+\s+\N*\S)/\\subsection*{$1}/gm I called this script Article and saved it as article.pl The usage then was $perl article.pl oldfile.tex newfile.tex and I got the following error message: Missing braces on \N{} at article.pl line 2, within pattern Nested quantifiers in regex; marked by -- HERE in m/^(Article\s+[0-9]+ \s+* -- HERE \S)/ at article.pl line 2. So I added braces as follows: \{N} I ran the script again; there was no error message but no newfile.tex either. I then ran the program as follows: $perl article.pl oldfile And the response is the command prompt and the file hasn't been modified. any suggestions? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Is there some IDE dedicated to perl?
Yes you can download Open Perl IDE or download TNL Perl Scripting Tool Regards Mani --- On Mon, 12/29/08, mobile.parmenides mobile.parmeni...@gmail.com wrote: From: mobile.parmenides mobile.parmeni...@gmail.com Subject: Is there some IDE dedicated to perl? To: beginners beginners@perl.org Date: Monday, December 29, 2008, 6:18 AM Hi, I am new to perl. Experience from the C programming tell my we can do something well with an IDE. But, is there some IDE of perl, in which we can do coding, debugging, etc? -- mobile.parmenides 2008-12-29 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
error at using config::ini
Dear all Please see the below code, i am in course of studying Configuration in perl, when i came across writing a small code, a error message was: Can't locate Config/IniFiles.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site /lib .) at cok.pl line 2. BEGIN failed--compilation aborted at cok.pl line 2. But my other programs works fine. The above module is found at local ie., C:/Perl/lib/Config.pm #cok.pl # use Config::IniFiles; my $file= Setup1.ini; my $ini=Config::IniFiles-new(-file=$file)or die could not open $file!; my $email=$ini-val('Network', 'email'); print check $email\n; Setup1.ini [Network] [EMAIL PROTECTED] [Book] title=good publish=sam author=tom Can i get some explanation what is the error behind this. Regards Mani __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: error at using config::ini
If i am wrong please correct me, i presume that config::ini must be installed in perl by while installing, if not what is the option for checking that config::ini is installed or not. Regards Manikandan --- On Sun, 10/19/08, Jeff Pang [EMAIL PROTECTED] wrote: From: Jeff Pang [EMAIL PROTECTED] Subject: Re: error at using config::ini To: [EMAIL PROTECTED] Cc: beginners@perl.org Date: Sunday, October 19, 2008, 2:04 PM 2008/10/19 mani kandan [EMAIL PROTECTED]: Can't locate Config/IniFiles.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site /lib .) at cok.pl line 2. It has said, you must install Config::IniFiles before using it. -- Jeff Pang http://home.arcor.de/pangj/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
use of Configuration files
Dear gurus, I want to know how to use configuration files concept in Perl, using configuration files working with Perl scripts that is using reading an input from *.ini files and if possible sample files for my reference Regards Manikandan
pointers in per
Dear gurus nbsp; I have to write a program with configuration file *.CFG, inbsp;came to knownbsp;have to use pointers nbsp; I amnbsp;new to pointer in perl cannbsp;i get some tipsnbsp;about pointers in perl, where can i getnbsp;study materials and sample files. Anticipating a favorable reply nbsp; Regards nbsp; Manikandan Nnbsp; nbsp; nbsp; __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
perl CBT
Hai Gurus Is there is availabilty of PERL Computer based tutorial, if so where is it available ? regards N. manikandan - The fish are biting. Get more visitors on your site using Yahoo! Search Marketing.
Re: perl
Sorry for delay response yes it works fine perl C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl but i get error log when i use the apache server [error] client [127.0.0.1] OS3 The system cannot specified the path specified: *C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl regards yitzle [EMAIL PROTECTED] wrote: [error] client [127.0.0.1] OS3 The system cannot specified the path specified: *C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl *This means the server is trying to access a file that that path and can not find it. If you ensure that the file is at that path, it ought to work. To test if the file is there, run the following line: perl C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl - No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started.
Re: perl
My files are in cgi-bin directory It reads as *C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl* Yes it Programfiles then Apache Group and then Apache2 please clarify mani Go to the folder that first.pl is in (should be cgi-bin). Press backspace to go up one folder. It should be Apache2. Press backspace to go up a second folder. Is it Apache Group or is it Program Files? On 3/30/07, mani kandan wrote: Dear all Earlier i did not see the error message properly sorry! I found my apache installed in the *C:\Program Files\Apache Group\Apache2*, Is that,it is correct *or *it should be read as *C:\Program Files\Apache2\ * Please read my error message: [error] client [127.0.0.1] OS3 The system cannot specified the path specified: Couldn't create child process: 72003 : first.pl [error] client [127.0.0.1] OS3 The system cannot specified the path specified: *C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl* regards mani yitzle [EMAIL PROTECTED] wrote: Go to the folder that first.pl is in (should be cgi-bin). Press backspace to go up one folder. It should be Apache2. Press backspace to go up a second folder. Is it Apache Group or is it Program Files? On 3/30/07, mani kandan wrote: Dear all Earlier i did not see the error message properly sorry! I found my apache installed in the *C:\Program Files\Apache Group\Apache2*, Is that,it is correct *or *it should be read as *C:\Program Files\Apache2\ * Please read my error message: [error] client [127.0.0.1] OS3 The system cannot specified the path specified: Couldn't create child process: 72003 : first.pl [error] client [127.0.0.1] OS3 The system cannot specified the path specified: *C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl* regards mani - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.
Fwd: perl
Hai all Get me to help this problem solved. - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.---BeginMessage--- sir I would much appreciate if you help me in finding the problem I am using apache 2.0.04 win32 version in window XP, I got error message saying internal server error I checked the error log and My error logs says as reads below The system cannot find the path specified : couldn't create child processes: 720003: first.pl The system cannot find the path specified : couldn't spawn processes: c:\programfiles\apahce2\cgi-bin\first.pl Kindly help me to get this problem solved And the reply from apache This does not seem to be a bug. Please post your question on the users support list (http://httpd.apache.org/userslist.html) since bugzilla is not support forum, but for reporting bugs. Hope this information is okay Is that my apache is problem, or my coding, but perl coding works fine in perl interpreter PS: kindly help me and guide me how to subscribe to get correct infromation, since i am new user to perl-cgi and apache Kindly help me this problem solved wam regards mani - Get your own web address. Have a HUGE year through Yahoo! Small Business.---End Message--- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: perl
The location is perl c:\program files\apahce2\cgi-bin\first.pl I am sure about it shows very clear in error message The system cannot find the path specified : couldn't spawn processes: c:\programfiles\apahce2\cgi-bin\first.pl. Instead of programfiles in my system it is program files Are you sure the file is at that location? Try running perl c:\programfiles\apahce2\cgi-bin\first.pl I suspect it ought to be: - program files opposed to programfiles - apache2 opposed to apahce2 On 3/30/07, mani kandan [EMAIL PROTECTED] wrote: Hai all Get me to help this problem solved. - Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. -- Forwarded message -- From: mani kandan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 27 Mar 2007 21:33:40 -0700 (PDT) Subject: perl sir I would much appreciate if you help me in finding the problem I am using apache 2.0.04 win32 version in window XP, I got error message saying internal server error I checked the error log and My error logs says as reads below The system cannot find the path specified : couldn't create child processes: 720003: first.pl The system cannot find the path specified : couldn't spawn processes: c:\programfiles\apahce2\cgi-bin\first.pl Kindly help me to get this problem solved And the reply from apache This does not seem to be a bug. Please post your question on the users support list ( http://httpd.apache.org/userslist.html) since bugzilla is not support forum, but for reporting bugs. Hope this information is okay Is that my apache is problem, or my coding, but perl coding works fine in perl interpreter PS: kindly help me and guide me how to subscribe to get correct infromation, since i am new user to perl-cgi and apache Kindly help me this problem solved wam regards mani - Get your own web address. Have a HUGE year through Yahoo! Small Business. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ - Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.
Re: perl
Dear all Earlier i did not see the error message properly sorry! I found my apache installed in the C:\Program Files\Apache Group\Apache2, Is that,it is correct or it should be read as C:\Program Files\Apache2\ Please read my error message: [error] client [127.0.0.1] OS3 The system cannot specified the path specified: Couldn't create child process: 72003 : first.pl [error] client [127.0.0.1] OS3 The system cannot specified the path specified: C:\Program Files\Apache Group\Apache2\cgi-bin\first.pl regards mani That means that it is looking in that location for the file and it can't find the file there. Did you try running perl c:\programfiles\apahce2\cgi-bin\first.pl? That will execute the script if the script is there (ie the path is correct). If that does not work, then there is nothing wrong with Apache. It's just being told to look for a file where none exist. If that does work, and it runs your script, then there is something wrong with Apache. Try it out. On 3/30/07, mani kandan wrote: The location is perl c:\program files\apahce2\cgi-bin\first.pl I am sure about it shows very clear in error message The system cannot find the path specified : couldn't spawn processes: c:\programfiles\apahce2\cgi-bin\first.pl. Instead of programfiles in my system it is program files ** Are you sure the file is at that location? Try running perl c:\programfiles\apahce2\cgi-bin\first.pl I suspect it ought to be: - program files opposed to programfiles - apache2 opposed to apahce2 On 3/30/07, mani kandan wrote: Hai all Get me to help this problem solved. -- Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. -- Forwarded message -- From: mani kandan To: [EMAIL PROTECTED] Date: Tue, 27 Mar 2007 21:33:40 -0700 (PDT) Subject: perl sir I would much appreciate if you help me in finding the problem I am using apache 2.0.04 win32 version in window XP, I got error message saying internal server error I checked the error log and My error logs says as reads below The system cannot find the path specified : couldn't create child processes: 720003: first.pl The system cannot find the path specified : couldn't spawn processes: c:\programfiles\apahce2\cgi-bin\first.pl - The fish are biting. Get more visitors on your site using Yahoo! Search Marketing.