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.
while strict refs.
But somehow I don't want to remove the 'use Strict;'
Any way out?
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.
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.
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.
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
: 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
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.
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
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
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
name values will be coming.??
Thanks for any help.
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
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.
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
Hi all,
Did you read it?
Content-Disposition - do not enclose filenames in quotes
http://support.microsoft.com/kb/q182315/
Thanks,
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
} 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
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
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
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
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.
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
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.
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
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.
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.
=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.
?
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
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
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
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
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
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
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.
Looking to buy a comprehsive book on CGI and SQL, any recommendations.
Thanks,
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.
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.
, 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
. 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.
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
, 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
-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.
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
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 *.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.
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
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.
:) 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
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.
?
Thanks for any input.
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
/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
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
From: $email\n;
Thanks in advance,
Sara.
From: $email\n;
Thanks in advance,
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.
(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
@.
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]
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
contains the colon at the end :
Thanks for any input
Sara.
$name = SARA DEILEY;
how its possible to grasp only initials for First and Last name i.e $name =SD??
thanks.
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.
.
}
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.
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
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
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
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
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.
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.
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.
71 matches
Mail list logo