Re: change one line in a large fine

2022-11-20 Thread support
May i ask a question about reading file? while(0){ print 'hi' } Will never print hi. cat 1.txt: 0 open FH, '1.txt' or die; while() { print 'hi' } This will print hi. Since $_ == 0 here, why while become true? I am confused about this. Regards November 20, 2022, 8:57 PM, "Kang-min Liu"

Re: library (random numbers)

2007-08-07 Thread A. Teumim - Netgear Support
So this is what I have now in my library: sub sumIt{ my $total; $total += $_ for @_; warn @_ was empty, total undefined!\n if !defined $total; } sub avg(@) { my @arr = @_; my $arrSize = scalar(@arr); #(last index). Double check; return sumIt(@arr) / @arr; } 1; Why is return sumIt(@arr)

run a function every so often *inside* the script automatically...

2004-04-25 Thread Dan - cPanel Support
Hello list! On a sleepless Friday night/Saturday morning a question cam to mind and I had to ask... Assume I have a script that will run for 10 seconds. Is it possible to have a function executed every 2 seconds? I know it sounds weird but how would one go about something like that?

Email problem

2004-02-29 Thread Support
Hi all This may be more appropriate in another perl forum, but I'll ask any way. I have two perl scripts, 1 running in the cgi-bin with a browser and an email output and the email address to me at [EMAIL PROTECTED] and this runs fine. I have another perl script running in another folder(out side

RE: Email problem

2004-02-29 Thread Support
Message- From: Support [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 29, 2004 10:50 AM To: [EMAIL PROTECTED] Subject: Email problem Hi all This may be more appropriate in another perl forum, but I'll ask any way. I have two perl scripts, 1 running in the cgi-bin with a browser

Writing to file

2004-02-01 Thread Support
Hi all I have a little bit of code you may be able to help with. I load a file into an array with foreach $lines(@database_array) { @edit_array = split(/\:/,$lines); push(@member_array,[EMAIL PROTECTED]); $x++; } #loop and then play around with the array a bit, then I would like to load it back

Clearing Arrays

2004-01-14 Thread Support
Hi I do not want to continue this thread to bag other users, but I do have a number or perl books and it did take me some time to find out how to clear an array. From the replies I got (and I thank those who did reply) confirmed I was using ' @array=()' correctly. In the end, I found the

Clearing Arrays

2004-01-12 Thread Support
Hi All I have this little memory blockage again. If I 'push' data from a database into an array to look/manipulate the data and then using the same array name, 'push' data into the array from another database, the data from the second DB file is added to the data of the first. How can I clear

Loading Modules

2003-12-22 Thread Support
Hi All I have a perl module I want to use in a perl script and make available by the ' use mymodule.pm' call. Plus I would like to place it the same directory as the main script. The main script runs fine until I make a call to the module. I then then I get a ' subroutine not defined ' What am I

Re: Loading Modules

2003-12-22 Thread Support
At 08:15 a.m. 22/12/2003 -0800, you wrote: On Dec 22, 2003, at 1:06 AM, Support wrote: Hi All I have a perl module I want to use in a perl script and make available by the ' use mymodule.pm' call. I'll presume you meant use mymodule; # don't need the *.pm Yes Plus I would like to place

Loading Modules - More

2003-12-22 Thread Support
Thanks to all those who have replied Just to update This is the module call: use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); this is the sub call: $startdate = Date_to_Days($tyear,$tmonth,$tday); this is the error: Undefined subroutine main::Date_to_Days called at

RE: Loading Modules - More

2003-12-22 Thread Support
Thanks Dan I've read the Exporter docs and the module seems to be OK there. I'm pretty sure everything is OK with the module and the export/import functions. Using 'strict' and 'warnings' is telling me: 'Use of uninitialized value in length at newcaldb.cgi line 165' and I still sub error when I

Re: Loading Modules - Yipee!!

2003-12-22 Thread Support
Owen. If you were standing next to me I'd give you a big kiss (no I'm not really like that, just a figure of speech) It worked, how, why I'm still not sure. I did put the module into a subdirectory and called it Date and used the following. use Date::Pcalc qw(Delta_Days Add_Delta_Days

Dates

2003-08-19 Thread Support
Thanks to all those who replied. I ended up doing some research myself and found a good date module at http://search.cpan.org/author/STBEY/Date-Pcalc-1.2 for those who are interested in juggling dates. Its called Date::Pcalc Cheers Colin

Counting Days

2003-08-14 Thread Support
Hi All Just require a memory nudge again. I'm looking for a small script to count the number of days between two dates. Date format is dd/mm/ Cheers Colin --- www.rentmyplace.co.nz The ultimate in

Thumbnail pics - reply

2003-07-28 Thread Support
Thanks to all who responded about setting pic sizes on a perl generated html page. It just needed a few nudges to remove the memory block. A great forum everyone, keep it up Regards Colin ---

Thumb-nailing Pic's

2003-07-24 Thread Support
Hi All I'm using perl to write a html page on the fly which includes photos of different sizes. Does anyone know of a bit of code that I can add to my script that ensures the resulting page shows the pictures on the page all the same size regardless of the original picture size. Cheer Colin

Syntax def required

2002-04-12 Thread Support
. push @{$xcp_request-{attributes}-{nameserver_list} or this $xcp_request-{attributes}-{contact_set}-{$contact_type}-{$contact_ke y} = $in{$key}; 1000 thank-yous Scott Lutz Pacific Online Support Phone: 604.638.6010 Fax: 604.638.6020 Toll Free: 1.877.503.9870 http://www.paconline.net

Not enough space

2001-09-16 Thread Suresh Babu.A [Support]
Hello, Can anyone help me to identify where the problem is in the below code. = Error Msg : Not enough space at 1.pl line 2. = #!c:/iperl/cgi-bin/perl.exe open (FHAN,

CPI PERL SITE

2001-09-07 Thread Suresh Babu.A [Support]
Hi All, Can any one suggest me a link to online CGI-Perl Book. Thanks SureshA [EMAIL PROTECTED] === The cause of evil is our desire to be superior to others and our selfishness.

Re: Unable to open a File -- ANY HELP PLS.

2001-09-07 Thread Suresh Babu.A [Support]
Hi All, [Sat Oct 6 16:56:59 2001] abn.pl: Not enough space at abn.pl line 6 What is the error all about? Thanks Suresh -- Forwarded message -- Date: Fri, 7 Sep 2001 02:37:33 +0530 (GMT) From: Suresh Babu.A [Support] [EMAIL PROTECTED] To: brian d foy [EMAIL PROTECTED] Cc

Unable to open a File

2001-09-06 Thread Suresh Babu.A [Support]
Hi All, I am unable to open the file, using the below mentioned code. open (FHTML,Z:\\amro\\log\\va.txt) || die (Can't Open the File); Web Server : Apache OS : Windows 95 The file va.txt is having full permission (rwx for all). Thanks in advance. Thanks SureshA [EMAIL PROTECTED]

Re: Unable to open a File

2001-09-06 Thread Suresh Babu.A [Support]
Hi Brain, When i tried $!, i got the below error [Sat Oct 6 16:56:59 2001] abn.pl: Can't Open the File. [Sat Oct 6 16:56:59 2001] abn.pl: Not enough space at abn.pl line 6 for the code $lfile=Z:\\amro\\log\\sar\\pa.txt; open (FHTML, $lfile) || die (Can't Open the File.\n$!); But when i

Help Me

2001-08-29 Thread Suresh Babu.A [Support]
Dear All, I have problem in opening the file and closing it in the below mentioned script. Kindly help me to fix it. Thanks in advance. Thanks Suresh A. #!/usr/local/bin/perl -w $shipdir=/databin/OUTGOING/SHIPMENT/bis/suresh; $custdir=/uhome/cachet/temp/temp1/cust/;

Perl Regular Expressions

2001-08-06 Thread Suresh Babu.A [Support]
Hi, Any free links for Perl regular expressions, kindly provide me !!! Thanks SureshA [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Executing Remote Script with parameters

2001-07-07 Thread Suresh Babu.A [Support]
Ladies and Gentlemen, I am executing a script from the client, which should internally call a script of a remote server and i have to pass argument from the client. Any help regarding this is much appreticated. Thank you very much for your time. SureshA [EMAIL PROTECTED]