File Downlaod issue.

2007-04-19 Thread Sara
I have directory from which users are downloading files directly using FTP client (no browser). If I can run a script or program, which could tell me as which files have been downloaded? File::Stat changes? if they simply download the file from FTP? Or is there any other way? Sara.

Can't use string as a subroutine ref while strict refs

2006-11-09 Thread Sara
while strict refs. But somehow I don't want to remove the 'use Strict;' Any way out? Sara.

.wav and mp3 length.

2006-10-14 Thread Sara
Need to determine the .wav and mp3 file length not in bits or bytes, but in minutes. It's for a dictation recording service who needs to invoice the clients as per the minutes of files uploaded to their servers. I searched the CPAN but of no help. Thanks, Sara.

Getting status of files before copying/moving.

2006-10-02 Thread Sara
uploaded at the time it was invoked. # Start of Subroutine # sub copy_files { use File::Copy; while (glob (*.mp3)) { copy(home/uploads/$_, home/backup/$_); move(home/uploads/$_, home/music/$_); } } ## Thanks, Sara.

Regex Help.

2006-06-24 Thread Sara
Need help to remove EVERY thing (non-alphabets, symbols, ASCII codes etc) from a string except for a-zAZ, 0-9, dash and underscore. $string =~ s/?? Thanks, Sara.

C++ query with mySQL

2006-04-09 Thread Sara
I have been stuck here, SOS call: Using CGI.pm, I have the script calling certain categories from mySQL table. my $cat = $q-param('cat'); my $dbh - prepare (SELECT * FROM main WHERE CAT='$cat'); Sample Categories('CAT') are given below: PHP/Ad_Management/Classifieds Perl_and_CGI/Ad_Management

Re: referer throwing Internal Server Error

2006-03-13 Thread Sara
: Bad Referer: $referer \n; } else { print all cool: $referer \n; } Sara. - Original Message - From: David Gilden [EMAIL PROTECTED] To: beginners-cgi@perl.org Sent: Tuesday, March 14, 2006 6:30 AM Subject: referer throwing Internal Server Error Greetings from Cow Tow! Here is my

Electronic Signatures.

2006-03-05 Thread Sara
What is meant by Electronic Signatrues? How these could be implemented using Perl where the documents are being generated from forms input, but these documents need to be electronically signed. I tried to search, but my concepts are not clear about it. Anyone can help? Sara.

Matching a string containing '+'

2006-02-07 Thread Sara
Using this query in my Perl Script to find the Category title from the database given as: C_and_C++/Forums C_and_C++/Codes C_and_C++/Sites etc. my $sql = qq(SELECT CAT_TITLE, FROM categories WHERE CAT_TITLE REGEXP '^C_and_C\\+\\+/[a-zA-Z|_]+\$' ) $query = $dbh - prepare ($sql) or die Couldn't

Re: Filering a file

2005-12-06 Thread Sara
Thanks, Sara. - Original Message - From: Adedayo Adeyeye [EMAIL PROTECTED] To: 'David Dorward' [EMAIL PROTECTED]; 'Perl Beginners - CGI List' beginners-cgi@perl.org Sent: Tuesday, December 06, 2005 12:14 PM Subject: RE: Filering a file Hello David, I'm able to open the file

Re: uninitialized variable

2005-11-01 Thread Sara
my $action = param('form_action') || 'any_default_value'; HTH, Sara. - Original Message - From: Chris Devers [EMAIL PROTECTED] To: Adedayo Adeyeye [EMAIL PROTECTED] Cc: beginners-cgi@perl.org Sent: Tuesday, November 01, 2005 8:42 PM Subject: Re: uninitialized variable On Tue, 1

Taking Multiple Values for The Same Form Field.

2005-10-28 Thread Sara
name values will be coming.?? Thanks for any help. Sara.

Re: Taking Multiple Values for The Same Form Field.

2005-10-28 Thread Sara
Thanks for the quick respons, just need a bit more help. Now I need to write these values in a text file (I am fully aware of writing to files) but where I am gettin' confused is that : I told you that Name is a required field, but Email is optional. so what if : my @name = ('Sara', 'John

Fast CGI.

2005-10-09 Thread Sara
I am a new dedicated server where: FastCGI: Enabled I am at a loss as what I need in my scripts to run them with Fast CGI? .fcgi extension? and what else. Thanks for any help. Sara.

Re: Forcing a save as' dialogue box to come up on left click

2005-09-20 Thread Sara
Hi all, Did you read it? Content-Disposition - do not enclose filenames in quotes http://support.microsoft.com/kb/q182315/ Thanks, Sara. - Original Message - From: Wiggins d'Anconia [EMAIL PROTECTED] To: Tony Frasketi [EMAIL PROTECTED] Cc: beginners-cgi@perl.org Sent: Tuesday

Re: Forcing a save as' dialogue box to come up on left click

2005-09-20 Thread Sara
Hi all, Did you read it? Content-Disposition - do not enclose filenames in quotes http://support.microsoft.com/kb/q182315/ Thanks, Sara.

Re: cookies as hidden files

2005-09-16 Thread Sara
have never experienced HIDDEN cookies, new phenomenon for me atleast. HTH, Sara. - Original Message - From: Denzil Kruse [EMAIL PROTECTED] To: beginners-cgi@perl.org Sent: Friday, September 16, 2005 9:08 AM Subject: cookies as hidden files Hi all, I read through the docs for CGI

Exact matching using GREP.

2005-09-08 Thread Sara
} is 'perl/chat' it should pick only 'perl/chat' from @present. I saw the Unix man pages and did other searches and found '-x' switch to use for exact matching with GREP and '-e' switch for pattern matching but dont' know how to incorporate it within my code. TIA, Sara

Re: Exact matching using GREP.

2005-09-08 Thread Sara
No, it's not working, probably you didnt' get my question. Anyways, thanks for a prompt reply. Sara. - Original Message - From: Ovid [EMAIL PROTECTED] To: beginners-cgi@perl.org Sent: Friday, September 09, 2005 12:01 AM Subject: Re: Exact matching using GREP. --- Sara [EMAIL

Regex Problem.

2005-08-18 Thread Sara
database. For example if the word is blood I want to get results using regex: for blood: check(blo) then check(loo) check(ood) for Globin Test: check(Glo) then check(lob) check(obi) check(bin) check(Tes) check(est) TIA. Sara. sub check { my $check = $dbh - prepare(SELECT * FROM

Re: Regex Problem.

2005-08-18 Thread Sara
That's worked like a charm, You ALL are great. Thanks everyone for help. Sara. - Original Message - From: [EMAIL PROTECTED] To: 'Sara' [EMAIL PROTECTED] Sent: Thursday, August 18, 2005 10:50 PM Subject: RE: Regex Problem. Hi Sara, what is about somthing like $string = 'blood

Script execution time.

2005-08-03 Thread Sara
in PERL/CGI? I searched CPAN but failed to find my desired requirements. Are there any system commands that can be executed within the script to get these values. TIA. Sara.

Re: export to text file

2005-06-08 Thread Sara
I always used 'phpmyAdmin' for such tasks. Give it a try. Thanks, Sara. - Original Message - From: Glauco Magnelli [EMAIL PROTECTED] To: beginners-cgi@perl.org Sent: Wednesday, June 08, 2005 10:55 AM Subject: export to text file I do a query to mysql table and view the result

CGI::Cookie Reading.

2005-03-29 Thread Sara
something like it: if ($id) {do blah} else {do blah} but that's not working either. It's my first time using CGI::Cookie, how can I overcome this problem Thanks for any input, Sara.

removing dupes from fetchrow_array()?

2005-03-23 Thread Sara
Following is the code used in my CGI script. my $query = $dbh - prepare(SELECT * FROM invoices WHERE ID = '$ID'); $query - execute(); while (my @row = $query - fetchrow_array()){ print $row[1] - $row[2] - $row[3]br; } What If I want to remove dupes from @row? like if $row[2] is similar in

Content_Length

2005-02-03 Thread Sara
I have like 20 variable coming from a form, using CGI.pm in my script. I am at a loss as how to get $ENV{'Content_lenght'} for all of those collectively. Is there anything in CGI.pm for it?. I am trying to count every keystroke that user inputs to form. Thanks, Sara.

Addendum: Content_Length.

2005-02-03 Thread Sara
Why the length is not coming out? Any ideas? # my @aho = (fgfgfgf, fgfgfgfgf, fgfgfgfg); my $length += length($_) for @aho; print Content-type: text/plain\n\n; print $length; # Thanks, Sara.

Extracting links.

2005-01-16 Thread Sara
=0 src=http://www.mydomain.com/images/logo2.gif;/a |; #extract LINKS (no image links) only a href=http://www.mydomain.com; my @get = grep {/a .*?/} @array; print @get\n ### CODE END ### Thanks, Sara.

Reducing load on server.

2004-11-19 Thread Sara
? 4- Anyother possible query? Thanks, Sara. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: untainting data

2004-11-10 Thread Sara
If the 'name' is coming from a Form, try limiting it within the form tags, it's always a better idea. input type=text name=name MAXLENGTH=40 OR if you insist to do it within script; use 'substr' function. my $name = param('name'); my $limited_name = substr($name, 0, 40); Thanks, Sara

Re: untainting data

2004-11-10 Thread Sara
bad guys can always create their own form I can't say how others do it but almost my every script starts with: if ($ENV{'HTTP_REFREER'} !~ /yourdomain.com/) { exit; } it helps eliminating of Bad Guys forms shoving of data (no remote postings allowed). Sara. - Original Message

PPM problem.

2004-10-17 Thread Sara
I am trying to install DBI module for my perl installation on XP machine. Everything was working fine, I installed a lot of modules before using the same PPM, but now it has started giving this error (as shown below). I have searched, but failed to find anything. I installed a fresh version of

Apache::Session Error Handling.

2004-09-22 Thread Sara
Wondering how I can show custom error message if session file doesn' exist. http://search.cpan.org/~cwest/Apache-Session/Session/File.pm If session file doesn't exist: using CGI::Carp qw(fatalsToBrowser); Software error: Object does not exist in the data store at

Re: CPU load/server resources.

2004-07-14 Thread Sara
module for it? I tried to search but failed to find. Once again thanks for your help. Sara. - Original Message - From: Wiggins d Anconia [EMAIL PROTECTED] To: Alexander Blüm [EMAIL PROTECTED]; Sara [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 6:41 PM Subject: Re: CPU

CPU load/server resources.

2004-07-13 Thread Sara
within the script that can give me the CPU/resource usage when the script runs? I have NO idea about it. Can anyone help me with it? Thanks in advance. Sara.

CGI and mySQL book, any recommendation.

2004-05-28 Thread Sara
Looking to buy a comprehsive book on CGI and SQL, any recommendations. Thanks, Sara.

Regex Help!

2004-03-21 Thread Sara
spaces in between) in the string however string may contain periods (.) and (,) in it. I am looking to extract. 1. First Character of the string. 2. Next two Characters after space in the String. Doe, John L.L.M should be DJL Simth, G. M.D. should be SGM Any help, please? Thanks, Sara.

MIME::Lite

2004-03-08 Thread Sara
Is MIME::Lite only capable of sending email attachments present on your server? What If I want the users to give ability to attach files from their hard drives from a form input. Is there any other module for it? Thanks, Sara.

Comparing text text::diff

2004-03-06 Thread Sara
, it becomes a time waster. Now, I am looking for a way where I can highlight (by enclosing changes with B/Btags) the changes (if the $text2 is different from $text1) either within the output of Text::Diff or separately from it. TIA, Sara

encrypting email address (to prevent spam)

2003-12-17 Thread Sara
. eg. $email = [EMAIL PROTECTED]; using some search and replace/translate function ? $email = blah..3b92a98ualwetwe334...blah; and then translating it back to email when needed. Thanks for any input. Sara.

Re: Bad referrer!

2003-12-07 Thread Sara
in the right direction? Thanks for your help. Sara. - Original Message - From: Wiggins d'Anconia [EMAIL PROTECTED] To: Sara [EMAIL PROTECTED]; beginperl [EMAIL PROTECTED] Sent: Sunday, December 07, 2003 3:20 AM Subject: Re: Bad referrer! Sara wrote: There was a script which people

Bad referrer!

2003-12-06 Thread Sara
, then why others are not getting any bad referrer error. If no, what could be the possible reasons that owner is the only person getting bad referrer error? TIA, Sara. @referers = ('http://www.foo.com', 'http://foo.com'); sub check_url

extracting email addys.

2003-11-19 Thread Sara
-mails from the text above and performing s/@/#/; on all addresses at the same time? Just want to extract email addys and want to replace @ with something un-readable by spam bots. Thanks for any Regex help. Sara.

Delete/Archive older enteries.

2003-11-06 Thread Sara
enteries). So the database gets updated automatically and all the old enteries are deleted. Now what I am trying to do is to append deleted enteries to another file too. In case, If I need to access older enteries I can access that archived file. Any ideas? Thanks for you help. Sara

Content-Length and printing

2003-11-03 Thread Sara
2 lines), how can I insert DIV style=page-break-after:always/DIV and then continue printing the remaining part? I tried to use 'while' statement but could not think of any good solution. Thanks in advance for any help. Sara. ### CODE ### $text = qq

unlink help.

2003-10-29 Thread Sara
unlink *.bak; how I am supposed to specify directory above? for example I have to apply above unlink command to delete all backup files in the Specified directory. $dir = /home/path/to/dir is it right? unlink $dir/*.bak; ?? Any ideas? Thanks, Sara.

Re: unlink help.

2003-10-29 Thread Sara
Thanks, Thats the point, I wanted to confirm. Sara. - Original Message - From: Wiggins d Anconia [EMAIL PROTECTED] To: Sara [EMAIL PROTECTED]; beginners-cgi [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 2:03 AM Subject: Re: unlink help. unlink *.bak

quotes problem

2003-10-20 Thread Sara
after first quote (), I KNOW where the problem is but at a loss to prevent it as I have tried all the options Any help!!!. thanks, Sara.

Re: quotes problem (solved).

2003-10-20 Thread Sara
:) its solved, sorry I was making a mistake. Thank you all for prompt help. Sara. - Original Message - From: Hanson, Rob [EMAIL PROTECTED] To: 'Sara' [EMAIL PROTECTED]; beginners-cgi [EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 4:05 AM Subject: RE: quotes problem I'm not sure

Truncate questions.

2003-09-13 Thread Sara
for example the last line 093 after truncate will be left 0 . Is there a way that it should remove the last full line \n? rather leaving 1 or 2 digits behind. Thanks for any input, Sara.

Perl/Linux problem.

2003-09-11 Thread Sara
? Thanks for any input. Sara.

Re: Perl/Linux problem.

2003-09-11 Thread Sara
Apache Error Log: premature end of script headers Thanks, Sara. - Original Message - From: Wiggins d'Anconia [EMAIL PROTECTED] To: Sara [EMAIL PROTECTED]; beginperl [EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:45 AM Subject: RE: Perl/Linux problem

Re: Perl/Linux problem.

2003-09-11 Thread Sara
/html\n; print Hello World\n; -- Thanks, Sara. - Original Message - From: drieux [EMAIL PROTECTED] To: cgi cgi-list [EMAIL PROTECTED] Sent: Friday, September 12, 2003 4:31 AM Subject: Re: Perl/Linux problem. : : Sara, : : Wiggins is right, one of the questions is what

Re: Stripping HTML from a text file.

2003-09-04 Thread Sara
Thanks a lot Hanson, It worked for me. Yep, you are right The regex way is good for quick and dirty HTML work. and especially for the newbies like me :)) Sara. - Original Message - From: Hanson, Rob [EMAIL PROTECTED] To: 'Wiggins d'Anconia' [EMAIL PROTECTED]; 'Sara' [EMAIL PROTECTED

Defining Return-path ...

2003-09-02 Thread Sara
From: $email\n; Thanks in advance, Sara.

Defining Return-path.....

2003-09-02 Thread Sara
From: $email\n; Thanks in advance, Sara.

Formatting integer input

2003-08-21 Thread Sara
$one = 2.5; $two = 2; $three = $one + $two; print $three; # prints 4.5 I want 4.5 in proper format as 04.05 Any ideas? Thanks, Sara.

Flock and Sleep

2003-08-14 Thread Sara
(sub get_number { open(NUMBER,data.txt); flock (NUMBER, 2); Do blah blah blah close (NUMBER); closing a file automatically removes the lock?? or should I have to unlock it by placing flock (NUMBER, 8); close (NUMBER); My second question is how I can delay the execution of a script (If two

Regex and Email address.

2003-08-14 Thread Sara
@. I know I am poor at Regex (too poor). Thanks for any input. Sara. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex and Email address.

2003-08-14 Thread Sara
Simple Regex problem How you will convert $email = [EMAIL PROTECTED]; TO $email = [EMAIL PROTECTED]; using Regex. Thanks, Sara. - Original Message - From: gregg To: Sara Cc: [EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 6:59 AM Subject: Re: Regex and Email

Bolding and Underlining.

2003-07-21 Thread Sara
contains the colon at the end : Thanks for any input Sara.

Regex problem

2003-07-20 Thread Sara
$name = SARA DEILEY; how its possible to grasp only initials for First and Last name i.e $name =SD?? thanks.

Comparing two text files.

2003-07-12 Thread Sara
to compare both text files and the script should produce that this. i.e after comparing the file nos. it should report which file is found and which is not found. file1.html was found in the data.txt file2.html was NOT found in the data.txt file3.html was foundi in the data.txt TIA, Sara.

Net::FTP

2003-07-10 Thread Sara
. } else { print File '$_' does NOT exist in '$Directory'.\n; # Optional: Add file to 'not exists' list for later reporting. } } close( NO ); } else { print ERROR: Unable to open file: $!\n; } Thanks, SARA.

Reading and comparing files from a directory

2003-07-09 Thread Sara
I m trying to read the files in a directory and match them with a same file names in text list. Below given are the couple of lines, but I am unable to get the results, rather getting the same line repeated This fileno1 does NOT found in directory but its in the list This fileno2 does NOT

Re: split function problem.

2003-07-09 Thread Sara
I am extremely thankful to you for your help. I always loved your way of teaching and explaining the code bit by bit. One more question I searched the google for HTH abbreviation but didn't find anything. Can you tell me what does it mean? Thanks, Sara, :)) - Original Message - From

split function problem.

2003-07-08 Thread Sara
An input string like; $name_with_id = Deiley, Sara Jr., 1234; another example could be $name_with_id = DEILEY SARA, Jr,. 123; Two things are for sure in it always. 1- First part contains the alphabets (caps or small) with any number of commas and periods (full stops) in between or at the end

Counting the characters..

2003-07-06 Thread Sara
There is a form field 'description' which is the input for CGI script. $description = This is my description and it contains numerous __ double underscore marks and __ these marks some special area in the field What I want to do is to count/extract the amount of times these double underscore

Looking for form mail attachment script.

2003-05-31 Thread Sara
I am looking for a pre-written CGI Form script, which is capable of sending mails with attachment from my desktop etc. I have seen an example of this script sometimes back in the group. Any ideas? TIA, Sara.

Looking for form mail attachment script.

2003-05-31 Thread Sara
I am looking for a pre-written CGI Form script, which is capable of sending mails with attachment from my desktop etc. I have seen an example of this script sometimes back in the group. Any ideas? TIA, Sara.

Final IP ban subroutine.

2003-05-27 Thread Sara
value=$ipban$ipban/option see the make_form; subroutine above. Thanks for any input, for integrating the subject line in already existing script for banning IPs of BBS. Thanks, Sara.