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.
#x27;t use string ("main") as a subroutine ref while "strict refs.
But somehow I don't want to remove the 'use Strict;'
Any way out?
Sara.
I am getting Month, Day and Year from Drop Downs of a form to convert given
values to Unix timestamp.
I am able to put values in all the variables below except for $wday & $yday.
Any ideas as how I can get those with limited user input of month, day and year
only?
#!/usr/local/bin/perl
use POSI
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.
, limiting upload size, formats, etc
but this problem is encountered first time.
Any help?
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_Manageme
m|i) {
print "Your not authorized: Bad Referer: $referer \n";
} else {
print "all cool: $referer \n";
}
Sara.
- Original Message -
From: "David Gilden" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, March 14, 2006 6:30 AM
Subject: referer throwing Internal
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'
";
exit;
# End of Code ####
Thanks,
Sara.
- Original Message -
From: "Adedayo Adeyeye" <[EMAIL PROTECTED]>
To: "'David Dorward'" <[EMAIL PROTECTED]>; "'Perl Beginners - CGI List'"
Sent: Tu
ans that there is some way to detect it or it's because of
https? If SSL can deal with this issue I am ready to go for it but just need to
confirm or alternative solution to it before I make my move.
Thanks for any help.
Sara.
my $action = param('form_action') || 'any_default_value';
HTH,
Sara.
- Original Message -
From: "Chris Devers" <[EMAIL PROTECTED]>
To: "Adedayo Adeyeye" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, November 01, 2005 8:42 PM
Subje
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 = ('Sa
multiple name values will be coming.??
Thanks for any help.
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.
Hi all,
Did you read it?
Content-Disposition -> "do not enclose filenames in quotes"
http://support.microsoft.com/kb/q182315/
Thanks,
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" <[EMA
window for fresh headers.
I have never experienced HIDDEN cookies, new phenomenon for me atleast.
HTH,
Sara.
- Original Message -
From: "Denzil Kruse" <[EMAIL PROTECTED]>
To:
Sent: Friday, September 16, 2005 9:08 AM
Subject: cookies as hidden files
Hi all,
I r
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:
Sent: Friday, September 09, 2005 12:01 AM
Subject: Re: Exact matching using GREP.
--- Sara
s, php/forums and every element containing php.
How I am supposed to do Exact matching that if $row->{CAT_TITLE} 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
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,
atching words within mySQL 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) &
g 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:
Sent: Wednesday, June 08, 2005 10:55 AM
Subject: export to text file
> I do a query to mysql table and view the re
ie doesn't exist or I mean for the first time visitor, it gives error:
"Can't call method "value" on an undefined value"
I tried to do 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]";
}
What If I want to remove dupes from @row? like if $row[2] is similar
##
Thanks,
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.
uot;;>
|;
#extract LINKS (no image links) only http://www.mydomain.com";>
my @get = grep {//} @array;
print "@get\n"
### CODE END ###
Thanks,
Sara.
can I do to reduce load on mySQL, PERL and server? Should I use
CGI::Fast?
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>
No I don't know, can you please explain.
How it can be spoofed, I am interested in details.
- Original Message -
From: "Bob Showalter" <[EMAIL PROTECTED]>
To: "'Sara'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, N
>>> 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
If the 'name' is coming from a Form, try limiting it within the form tags,
it's always a better idea.
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.
-
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
Per
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
/usr/share/perl5/Apache/Sessio
CPAN 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]>;
<[
utine 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.
ds (obvioulsy with 2
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.
he typist to
review the feedback from QA, it becomes a time waster.
Now, I am looking for a way where I can highlight (by enclosing changes with
tags) the changes (if the $text2 is different from $text1) either within the
output of T
r of those and vice versa. 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.
steer me 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:2
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.co
-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.
#!/usr/bin/perl
use CGI;
use LWP::UserAgent;
my $q = new CGI;
my $query = $q->param('query') || 'LWP';
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $response = $ua->get("http://search.cpan.org/search?query=$query";);
if ($response->is_success) {
my $server_response = $response->conte
g 7 days old
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
haracter line, after every 2
lines), how can I insert
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|
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: Thurs
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.
:) 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: Tue
I am getting the input from a form.
Sorry but, If I Single quote the string, everything is then literal, it
Won't work if there's a variable in the string.
any other suggestion for the given below query string:
http://foo.com/test.cgi?field=this%20is%20"My"%
script stops printing everything 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.
open (DB, "+
--
and simply
print "Content-Type: text/html\n";
print "Hello World\n";
--
Thanks,
Sara.
- Original Message -
From: "drieux" <[EMAIL PROTECTED]>
To: "cgi cgi-list" <[EMAIL PROTECTED]>
Sent: Friday, Septe
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: Fri
t editor for Linux, if yes, what are the recommendations?
Thanks for any input.
Sara.
';
$html = get($url);
@html = split(/\n/,$html);
foreach $line(@html) {
chomp ($line);
$line =~ s|.*?<\/head>||s;
print "$line\n";
}
#
Thanks for any input.
Sara.
- Original Message -
From: "Sara" <[EMAI
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
file from a certain tag
upto certain tag.
For example; I want to delete the code completely that comes in between and
(including any style tags and embedded javascripts etc)
Any ideas?
Thanks in advance.
Sara.
rint MAIL "To: $recip\n";
print MAIL "Reply-to: $email\n";
print MAIL "From: $email\n";
Thanks in advance,
Sara.
rint MAIL "To: $recip\n";
print MAIL "Reply-to: $email\n";
print MAIL "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.
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
Su
@.
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]
(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
What could be the simplest test to check 'flock' working on your server or not?
except for writing to support team of host ::))
Thanks for any input.
Sara.
://javascript.internet.com
and put "Must Come From" in the search box there, and hopefully it will come
up with the script.
Thanks,
Sara.
- Original Message -
From: awarsd <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 4:27 PM
Subject: .htacc
$TS = "THIS INPUT IS IN ALL CAPS";
$TS_cont = lc $TS;
$TS now prints out "this input is in all caps"
What If I want first letter in caps for every word in string? which should be "This
Input Is In All Caps"
TIA,
Sara.
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.
found in data.txt
though, file1.html and file2.html exists in data.txt
Any ideas what I m doing wrong?
I want 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.
if ( -f "$Directory/$_" )
{
print "File '$_' exists in '$Directory'.\n";
# Optional: Add file to 'exists' list for later reporting.
}
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 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, :))
- O
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 found
First of all thanks for your prompt reply.
its not just the comma separated list, it contains sometimes comma in the
middle of name and sometime
at the end of name.
I am looking for some Regex in the split function to separate both fields.
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)
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
dates like birth = 02151956 should be 02/15/1956
Any help??
Thanks,
Sara.
How to call the variables from the config file using CGI. pm?
#!/usr/bin/perl
use CGI;
my $q = new CGI;
require "config.txt";
print "Variables_from_the_config_file";
???
Thanks,
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.
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.
{
chomp($line);
($ipban,$subject) = split(/\|/,$line);
next unless $ipban eq $current_ip;
&error(bad_ip);
last;
}
####
SECOND:
I have just started using CGI.pm, its probably my second or third
script using CGI.pm and I have no idea how to split the IPban.txt
and put the variables IPs and Subject line like this:
$ipban | $subject
Currently I am getting the output like this:
$ipban
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.
85 matches
Mail list logo