473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

out of memory while running perl script

Hi,
I tried to run a simple perl script in windows and linux.



sub ispallindrome($);

print ("enter a string");
chomp (my $string = <STDIN>);

print ("The given string is", ispallindrome($string) ? "":"not" , "a pallindrome");

sub ispallindrome($) {
my $string = $_[0];
my $l_ptr = 0;
my $r_ptr = length($string) - 1;
while (l_ptr <= r_ptr) {
my $l_char = lc substr($string, l_ptr, 1);
my $r_char = lc substr($string, r_ptr, 1);
if($l_char ne $r_char) {
return 0;}
else {
$l_ptr++;
$r_ptr++;}
}
return 1;
}

I'm getting 'out of memory' problem in windows and 'killed' problem in linux...
can somebody pls help....

thanks in advance..
Jan 27 '12 #1
1 1813
sorry sorry... i got it...

anyways thanks for those who tried to solve this...
Jan 27 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: von | last post by:
Is it possible to run a Perl script from within a javascript? I have an existing javascript that provides some data - and I want to write that data to a text file on my server via a Perl script...
3
by: sir.linying | last post by:
My php script is to call perl scipt which makes use of Spreadsheet::ParseExcel module to parse Excel file. I am able to launch php script from command line so that perl script can run and properly...
4
by: benwylie | last post by:
I am running IIS 6.0 on Windows 2003. I would like to be able to run a perl script from a web page and include the output. I have tried doing it with an ssi: <form action='docsearch.shtml'...
2
by: carllucas | last post by:
I have no exprience with perl. What I'm trying to do is have a script/program constantly (perpetually) running on my server so that it performs a routine (like every hour) and automatic check of...
1
by: satish2112 | last post by:
following is my Html code: <form name="form100" method="post" action="script.pl"> <textarea cols = "160" rows="12" name="TextArea1" > </textarea> <input align = "left" name="UpdateButton"...
1
by: Tension | last post by:
Hi. I have a Perl script that starts a build process (plus a lot of other things). The build process needs a few environment variables set. This is done automatically in a buildEnv.bat script...
5
by: tudorbalan | last post by:
I'm a complete beginner in Perl.In fact... I just need a perl script to upload files to server without having to use html <input type="file"> tag. I found a script...it works when I run it in cmd...
6
by: aravindtn | last post by:
i have a netwok,and i have a perl script running on a machine(say machine1). the purpose of the script is to login to each of the other machines using ssh. i am able to logon to other machne (say...
2
by: mithunmo | last post by:
I am trying to automate the process of filling up the webforms and do a submit . I have the below program written but If I run the program . I get the following error message Can't call method...
0
by: somsub | last post by:
Hi All, I am facing a problem while running a perl script through selenium RC server . I recorded oone log in test case with slenium IDE and run it after that with the ide only and it worked...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.