Re: using Sleep instead of Cron

2004-05-18 Thread Motherofperls
My main concern was that the script would die from SIGALARM. I'm testing on and XP box and using the script on a FreeBSD box. How can I get the cron function on my XP box? Also I have to get admin permission for cron jobs. Which I don't think will be a problem. It's not important that th

using Sleep instead of Cron

2004-05-18 Thread Motherofperls
Hi all, I'm writing a script which fetches data every hour. I thought instead of using cron which is platform dependent, to use sleep and a goto statement. Is there any downfalls to this? At the start of the script I check to see if it was ran in the previous hour. BEGINNING: if(open(TIMECHEC

Re: how to get the buffer size of a string

2004-03-11 Thread Motherofperls
length() Returns the length in characters. How do I translate that to bytes?

how to get the buffer size of a string

2004-03-11 Thread Motherofperls
Is there a function to get the buffer size?

how to get the buffer size of a string

2004-03-11 Thread Motherofperls
Hi everyone, Does perl have a function to get the buffer size of a string? Thanks, Tricia

Sockets, Why can't I do this?

2004-03-10 Thread Motherofperls
I get an unknown error from the command prompt. My goal was to fetch a list of numbers for the socket port. Maybe it's just an XP problem ?? #!perl -w my$hostprog = 'localhost'; if(open(LOG, ">>./log.txt")){ }else{print "Couldn't open LOG";} use IO::Socket; use LWP::Simple; #get a list of socket n

HTTP_REFERER

2004-01-17 Thread Motherofperls
Hi all, Is there a way to get the path of the script that called the current script from the interpeter instead of from the HTTP_REFERER variable? Thanks Tricia

Re: script works from shell but not http

2004-01-12 Thread Motherofperls
Thanks everyone, The reason the BEGIN statement was there is I don't exactly know where my error logs are and it's faster to just read the file. Plus if it wasn't a script problem the err.txt file wouldn't be created. I'm not clear about why the script could function from the shell and not

script works from shell but not http

2004-01-11 Thread Motherofperls
#!/usr/bin/perl -w use strict; BEGIN{open(STDERR, ">./err.txt")} print "Content-Type: text/html\n\n"; foreach my $key (sort keys %ENV) { print "\$ENV{$key} = $ENV{$key}\n"; } None of my scripts are functioning on my new server. The BEGIN statement doesn't write err.txt But it does function

Getting the total size of a directory

2004-01-04 Thread Motherofperls
I'm running out of web space and want to write a script that tell me the size of certain directories so I can see where the hog is. Can anyone give me some quick code?

using SSL unable to write file

2003-12-26 Thread Motherofperls
Hi everyone, I'm trying to send info with (https) SSL and my program comes to a halt when writing a file and sending an email. SSL was set up by my hosting service with an unauthenticated certificate that I had them set up for demo purposes. Does this have something to do with it? Or is it a

Re: Is slicing web images possible with perl?

2003-11-27 Thread Motherofperls
In a message dated 11/26/03 6:28:54 AM Pacific Standard Time, [EMAIL PROTECTED] writes: BTW we'd all /really/ like to know who you are. This isn't a costume party :) I'm not sure what you meant by the above statement Rob. I'm guessing it goes with your signature. I think I will try GD. Is it

Is slicing web images possible with perl?

2003-11-25 Thread Motherofperls
I've tried to install image magic on my server a couple years ago, but found out it wasn't necessary for my project. But now I may need it. All I want to do is slice an image and add it to a database. It has to be executed automaticall from a script. Thanks

Re: Reading and from more than one filehandle / memory question

2003-11-05 Thread Motherofperls
This is my first attempt. My misunderstanding was in the fact that I could put the filehandles inside another filehandles while loop. #!perl use strict; &read_the_files; sub read_the_files{ print "\nread_the_files";# my$file1 ="./file1.txt"; #contents of file1.txt #1 #6 my$file2 = "./f

Re: help building hash on-the-fly?

2003-11-05 Thread Motherofperls
Hashes are for referencing by a key name. There isn't a need for a hash if you're using a number index.

Reading and from more than one filehandle / memory question

2003-11-05 Thread Motherofperls
I have some large files that all have data for filling one table. I'm concerned about memory resources. 1. I want to read from each of these files one line at a time at the same time without assigning the file to an array. I haven't done this one yet, Does anyone have any example code? I wa

Re: finding syntax errors

2003-10-27 Thread Motherofperls
I use editpadpro, (there is a lite free version of it). You can download syntax color schemes for perl code. It will give you the matching brace or parenthesis. http://www.editpadpro.com/cscs.html

How to sort 2 arrays and keep indices ordered?

2003-09-28 Thread Motherofperls
Hi all, Is there an easy way to sort 2 arrays and keep the relating indices together. for instance I have an array of times, and an array of emails. I would like to give the user a choice of sorting by time(numeral) or email(alpabetical); [EMAIL PROTECTED] = (); for(my$i=0;$i<@open_pages;$i++){

Re: How do I to a stack until a pattern is matched, How do I

2003-09-25 Thread Motherofperls
while () { if (/QUIT/) { last; } push @thestack, $temp; }

Re: How to secure database password? (was Re: Perl/DBI newbie: password stora...

2003-09-17 Thread Motherofperls
The only solutions I've discovered is: ( for less secure tables) 1. Crypt the password 2. Put it into directory not in the public domain 3. Set the permissions set only for your scripts. ( for more secure tables) 1. I would gather sensitive info last if possible. 2. Do not put the password on

Re: Perl/DBI newbie: password storage / security question

2003-09-13 Thread Motherofperls
I'm new to databasing too, and decided to put this question off till I got the basics down first. My beginners solution was to put the database info in a txt file in my cgi-bin and read the variables into the script. I also set the variables for the info with this code, which I read hides the

Re: What is qr for in reg expressions in a a string?

2003-08-14 Thread Motherofperls
In a message dated 8/13/03 8:59:58 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: Thanks, I had wonderful documentation program with perl 5.6. But when I updated to 5.8 with mod_perl php and apache (after formatting my disc because of a virus) I lost the documentation program, and nothi

Re: AOL and IP Address Changes

2003-08-14 Thread Motherofperls
Is this for tracking user id from page to page,  If so I have some javascript that automatically add the tracking number to all forms and links.

What is qr for in reg expressions in a a string?

2003-08-14 Thread Motherofperls
I've been reading the previous post and was wondering about what qr does in this code. use strict;   use warnings;   my @array = (     qr'^to: myprog'mi,     qr'^from: [EMAIL PROTECTED]'mi   );   my $str = 'To: myprog with trailing text';   foreach (@array) {     print "found\n" if $str =~ $_

Re: cookies

2003-08-14 Thread Motherofperls
Have you read the ebook beginning perl? I downloaded it but I don't have the url. Sorry. Try google with 'ebook beginning perl'

Re: Download Beginning Perl ebook

2003-08-14 Thread Motherofperls
Sorry for not contacting you first. I'm still new compared to most with web manners and programming in general. I've searched with search engines and asked in the forums and couldn't find the link to the book. I just gave up and created my own link. Thankyou for making this book freely availa

Re: AOL and IP Address Changes

2003-08-14 Thread Motherofperls
In a message dated 8/13/03 9:46:29 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: I see, you have no control of over the redirect. Use the IP address first and if it returns no match check for cookies. If the cookie returns nothing then create an popup input box with javascript. Yes an

Download Beginning Perl ebook

2003-08-14 Thread Motherofperls
I've posted the ebook Beginning Perl for downloading at: http://websiteprogrammin.com/wsp/docs/Beginning_Perl.zip";>http://websiteprogrammin.com/wsp/docs/Beginning_Perl.zip

Re: [ADMIN] Re: Download Beginning Perl ebook

2003-08-14 Thread Motherofperls
Yes, that's where I got it from, but I have asked a couple of times in the forums here and searched for it with search engines with no luck. So I just decided to upload it. http://learn.perl.org/library/beginning_perl/";>http://learn.perl.org/library/beginning_perl/ It took a couple hours to

php mod perl 5.8 apache2 question

2003-07-18 Thread Motherofperls
Hi all, I have downloaded and installed perl with apache and php Here are the readme file folders for each part of the packaged file Perl-5.8-win32-bin-0.1.exe openssl-0.9.6h php-4.23 mod_perl-2.0 httpd-2.0.43 AP804_source I have apache running ok and perl, but I can't get the hello world fil

checking OS support for flock

2003-06-27 Thread Motherofperls
I'm learning on a win98 machine and my webserver is a unix OS. win98 doesn't support flock and of course unix does. How can I code to test if the function is supported? I tried conditionals but it still throws the error.

Please explain warnings error

2003-06-26 Thread Motherofperls
Hi everyone, I'm getting this warning: Possible unintended interpolation of @pkg::array1 in string What does it mean and how do I fix it?

Can LWP::Simple tranfer image urls?

2003-06-20 Thread Motherofperls
Do I need to change the http header for transfering image urls? I get errors when I transfer a jpg: picture cannot be displayed because it contains errors.

Testing to see if a socket is in use

2003-06-17 Thread Motherofperls
I'm curious if it's possible to make a web page that controls: 1. testing to see if a socket is available 2. if not searching for another socket # 3. use html buttons to open and close sockets. Does anyone have an example of this?

Socket error: Illegal seek

2003-06-17 Thread Motherofperls
I'm getting this error on my unix server from my socket script. The script does fine on my localhost win98 box. What does Illegal Seek mean?

Socket question

2003-06-17 Thread Motherofperls
I have a script that opens a socket on my web server. The script doesn't close the socket. I opened the socket yesterday. When signing back on today the socket was closed and my scripts returns an error. How do I keep a socket open indefinately?

Re: system function

2003-06-17 Thread Motherofperls
In a message dated 6/16/03 11:35:03 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: > >I tried a couple of those ideas. > > > >I put a BEGIN statement in the script I'm trying to open and > >to my surprise > >it's opened. I'm still getting Error: No such file or directory > > > >The scrip

Re: system function

2003-06-16 Thread Motherofperls
I tried a couple of those ideas. I put a BEGIN statement in the script I'm trying to open and to my surprise it's opened. I'm still getting Error: No such file or directory The script is very small and on a unix platform: #!/usr/bin/perl use CGI; my$q = CGI::new(); print $q->header(); print "

system function

2003-06-16 Thread Motherofperls
I'm trying to execute a perl script with system("sendscript.pl"); I also tried exec("sendscript.pl"); Both of these return Error: No such file or directory The sendscript.pl is in the same directory as the script. What am I doing wrong?

Mail::Send or Mail::Sendmail question

2003-06-14 Thread Motherofperls
My script uses Sendmail. And I was just wondering about the question that is in todays topics, How to pack the mail module with your project. Do all servers with perl 5 and above come with Mail::Sendmail? Should I put Mail::Send in my programs library of odds n ends and use it instead?

Re: How do I market scripts and what should I be aware of.

2003-06-03 Thread Motherofperls
In a message dated 6/2/03 10:10:40 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: > -T > Thanks, I will put this post in my notes

Fwd: How do I market scripts and what should I be aware of.

2003-06-03 Thread Motherofperls
I use a BEGIN{open(STDERR, "./error.txt"} in my script to track errors and trace variables etc.  But I think a friend has pointed the error out to me. I'm checking now. --- Begin Message --- I use a BEGIN{open(STDERR, "./error.txt"} in my script to track errors and trace variables etc.  But I think

How do I market scripts and what should I be aware of.

2003-06-03 Thread Motherofperls
I am new to marketing. I know how to sell on ebay and that's about it. I don't know how to protect myself with legal jargon. Can anyone point me in the right direction? I've written a script that installs a Flash file on the users server using LWP and gathers info for the text files that the

Re: cgi object not returning file content

2003-05-31 Thread Motherofperls
Also I should mention that I create another cgi object for a diferent file that is out of scope and not related to this method. Does that matter?

cgi object not returning file content

2003-05-31 Thread Motherofperls
This is really strange. I have a method that works and returns all the values in a file for the cgi object. But on the second call to the script it opens the file and returns none of the cgi parameters. the $cgi->param( ) returns POSTDATA and the keywords( ) returns nothing. I'm using strict

substituting char in other languages besides english

2003-05-30 Thread Motherofperls
In my program I have a place where people can put descriptions with images. And I'm wondering about special characters in other languages. What should I allow for the description field. And my keyboard doesn't have the exclamation over the letter and the ~ over the n thing. How do I allow for

all Content-type headers removed and page doesn't throw error

2003-05-27 Thread Motherofperls
I'm having the same header problem as the mark. I removed all the headers and the script still functions, but it doesn't print the cookie header. There is a module for deleting previous headers but I can't remember what it's called. #!C:/Perl/bin/perl.exe BEGIN{open(STDERR, ">./errors/order.

Re: unix && windows permissions

2003-04-06 Thread Motherofperls
I'm afraid to use `ls -al` now because unix sytems may vary. I'm going to try the module suggested: http://search.cpan.org/author/MJD/Stat-lsMode-0.50 and insert the $^O to test for windows or unix. Then to test for windows permissions I can just use -r and -w, right? Somehow I would have to

File::Stat vers system('ls -al')

2003-04-06 Thread Motherofperls
http://www.rubycentral.com/book/ref_c_file__stat.html Ive read the above page which explains File::Stat methods. I'm just not sure how this translates to the various unix forms of drwxrwxrwx. Another thing I'm not clear on is the real user and the effective user.

why 2 r's in Owner permission: drwxr-xr-x

2003-04-06 Thread Motherofperls
I've read about 10 pages on unix permissions. So far I've learned that a directory is a file with a listing of subdirectories and files. And the d in drwxr-xr-x indicates the file is a directory. And if it begins with -, it's a file -rwxr-xr-x.Also the - separates permissions of the Ow

what's the mode number represent with stat()[2]?

2003-04-06 Thread Motherofperls
I've learned alot from all this. Thanks for the info! This is what I pulled from the learning perl book. ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$b locks) = stat(...) I tried this to access the mode but it puts out a number 16877 that I don't konw how to de

accessing the string from system("ls -al") / browse dir script

2003-04-06 Thread Motherofperls
I'm trying to put the string from the system("ls -al") into a variable. It simply prints to the page and puts 1 in the variable. I wan't to use this variable to determine the permissions for the files on a linux machine. Is there an easier way? Tricia

Re: unix && windows permissions

2003-04-05 Thread Motherofperls
Does windows use the chmod command in the same manner as unix

unix permissions

2003-04-05 Thread Motherofperls
I'm writing a file browser script. I've learned about chmod and unix permission numbers and what they represent. But how do I determine the owner, group and other permission settings. Is there a perl module that makes this chore easy? Thanks Tricia

Installing perl on partitioned drive

2002-04-23 Thread Motherofperls
Need instruction & not sure where to get it. I have downloaded apache and perl. I just partitioned my hard drive with partition magic, and now have 3 os systems on one computer. Win98, Win95, and Linux. And want to install Win2000 soon. What I want to know is do I have to put Active perl

get parked domain name

2002-03-27 Thread Motherofperls
I just parked a domain name a few days ago and now I want to use it. But I can't seem to access it with the $ENV variables. I've tried $ENV{'SERVER_NAME'} Which I thought would do the trick! Anyone have any tricks up their sleeve? Thanks Tricia

running perlfect search from script

2002-03-24 Thread Motherofperls
I installed the perlfect search on two sites. And I need to write a script so they can be indexed from an html form or link. Can Scripts run other scripts by sending a link to that file? In other words can I make the script indexer.pl run from a link.

Making my own error.logs

2002-03-20 Thread Motherofperls
My new web hosting service at oneononeinternet.com doesn't have error logs for each site. What do I do? Is there a way for me to create my own logs for my perl files?

Re: Installing modules on website

2002-03-20 Thread Motherofperls
That did the trick thankyou!

Installing modules on website

2002-03-20 Thread Motherofperls
I was reading and came across this code: I put the contents of Image-Size-2.98 under the Image directory. use lib qw(/home/yrkylady/www/cgi-bin/perl/Image); eval("use Image::Size 2.98;"); (print("Error: $@"), exit(-1)) if $@; And when I try to open my file I get this error: Error: Can't locate

Installing my own modules

2002-03-20 Thread Motherofperls
I want to use Image::Size on my site but my Server doesn't have it installed. I've been waiting for them to install it. ## But the reply I recieved from them was : Could you please explain in detail regarding the module Image::Size, I am little bit confused about the p

Width of an Image

2002-03-17 Thread Motherofperls
Hi everyone, I'm writing a CGI program that requires that I discover the dimensions of an image that a person uploads. Can perl or javascript do that? Thanks Tricia

Cookie question

2002-03-04 Thread Motherofperls
Can I read cookies, (written from a javascript located outside the cgi-bin), with a perl file located inside the cgi-bin?

Cookie question

2002-03-04 Thread Motherofperls
Hi, I have a javascript program that makes cookies from outside the cgi-bin. I want to access those cookies from a perl file within the cgi-bin. Cookies are a new subject to me and this is the code I've learned so far in making cookies. #!/usr/bin/perl -w # ic_cookies - sample CGI script that u

Cookies, What's wrong with this?

2002-03-03 Thread Motherofperls
Could someone tell me why this doesn't retrieve my cookie? The cookie has already been set by another page and I just want to retrieve it. #!/usr/bin/perl use CGI param, header,cookie; print header(); print header(-cookie=>'MY_COOKIE');

Re: Never had this happen before!

2002-02-07 Thread Motherofperls
Sorry , I have been programming all night and found an oversight on my part. Perl reported and error in a sub routine, but the error was above the routine above some of my comment lines where I didn't expect it to be. That was part of html code that was out of place. Live and learn I gue

Re: Never had this happen before!

2002-02-07 Thread Motherofperls
My program won't compile when the sub routine is in the program, but when I remove it from the program and put it into another file that I call test.pl, and compile test.pl which contains only the sub routine I'm checking, it compiles fine! Why does it do that?

Never had this happen before!

2002-02-07 Thread Motherofperls
I was happily programming, getting close to the end of my project just trying to figure out table placement in html within my largest function on the page. All of a sudden my function won't function! I didn't change any of the perl code! And it was fine except for table placement! Well, I r

Re: decimal point

2002-02-07 Thread Motherofperls
In a message dated 1/28/02 1:16:55 AM Pacific Standard Time, [EMAIL PROTECTED] writes: > I have a sub routine that I use for making all numbers calculate to two decimals places which I use for calculating money values. I will place it on my website. The site is new and only displays well in