Create a form for upload (you may also use CGI.pm to create the form)
like this:
form name=upload action=myperl.pl enctype=multipart/form-data
method=post
input type=file name=
input type=submit value= ok
/form
myperl.pl
use CGI (:standard);
my $file = param(file_to_upload);
my
Create a form for upload (you may also use CGI.pm to create the form)
like this:
form name=upload action=myperl.pl enctype=multipart/form-data
method=post
input type=file name=
input type=submit value= ok
/form
myperl.pl
use CGI (:standard);
my $file = param(file_to_upload);
my
|| To: 'B. Fongo'; [EMAIL PROTECTED]
|| Subject: RE: How do I make a variable globally accessible without
vars
||
|| B. Fongo [EMAIL PROTECTED] wrote:
|| :
|| : I get the usual warning Use of uninitialized . while trying
|| : to test a variable ($counter) which is initialized later in
|| : my
I get the usual warning Use of uninitialized . while trying to test a
variable ($counter) which is initialized later in my script. Using the
pragma use vars ($counter) makes it sticky. To avoid, I tried to work
around it by passing it to a sub.
my $counter = counter();
if ($counter ==
anyone's leg. So just explain it if you can.
(.domain4you.com from http:://www. domain4you.com.)
foreach (@domains) {
my $name = $_;
$name =~ s/^[^\.]+//;
print $name;
}
-Original Message-
From: B. Fongo [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 7:29 PM
To: [EMAIL
qualifier.
Oh! How I wish I could understand it. :-) I think I need to go back to
learn some more regexs.
|| -Original Message-
|| From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
|| Sent: Friday, April 16, 2004 5:40 PM
|| To: B. Fongo; [EMAIL PROTECTED]
|| Subject: Re: What exactly
How do I match a domain name starting from the dot?
# Match something like these
.domain4you.co.uk
.domain-house.de
This is what I have:
@domains = (http://www.domain.com , http://www.domain4you.co.uk
http://www.domain-house.de; https//rrp.cash-day.com
);
foreach
of www.domain4you.com, www will be truncated isn't it?
$name =~ s/^[^\.]+//;
I hope I got the logic right.
Thanks
Babs
-Ursprüngliche Nachricht-
Von: Hanson, Rob [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 16. April 2004 01:36
An: 'B. Fongo'; [EMAIL PROTECTED]
Betreff: RE: Regex
My implementation of Apache::Session::MySQL dies along the way, and
gives
unclear warning.
[error] Died at
/usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm
line 40.
I decided to implement session as a module call Store::Session, so as to
minimize recoding it in many script.
Babs
The error occurs on initial call, so id should be empty be then. I
expect the routine to open a new session (see code below) if session_id
is empty - but it fails then.
==
my $dbh = dbConnect();
# Get value of url or cookie id if any.
my
My implementation of Apache::Session::MySQL dies along the way, and gives
unclear warning.
[error] Died at /usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm
line 40.
I decided to implement session as a module call Store::Session, so as to
minimize recoding it in many script.
Babs
Is it recommendable to use the pragma use lib when installing a
program on a server shared by many users?
Assuming my IPS did not install certain CPAN modules which my needs, and
I decide to install them in my www directory.
In such a scenario, putting use lib on my scripts will add my module
I'm working on a shopping cart, and yet to implement Apache::Session.
But before then, I have a question on how to populate a shopping cart
without the page reloading. Is there a way of achieving this using perl?
I believe it is possible to use JavaScript event-handler can be to keep
track of
That should work provided you're returning only on list.
It is much better to use reference when passing or retrieving more than
one value.
For instance: Retrieve the values from a sub as refereces.
($xRef, $yRef, $zRef) = example();
#
my @x = @$x;
my @y = @$y;
my $z = $$z;
sub example {
.
What I don't understand - is why my scripts get only the first variable
in the config file, but fail on the rest.
Babs
-Ursprüngliche Nachricht-
Von: Randy W. Sims [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 14. März 2004 19:07
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: Problem
I've checked cpan AppConfig. I may get back to it.
Thanks Randy
-Ursprüngliche Nachricht-
Von: Randy W. Sims [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. März 2004 12:36
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: AW: Problem using require()
On 03/15/04 06:19, B. Fongo wrote
I have several modules which needs global variables from a text file
(global.txt).
Within each module, I use require global.txt to get my variables.
global.txt
$shop =
I'm trying to implement cgi sessions with Apache::Session and found
myself contemplating on a method to pass session id to my script.
I'll appreciate if someone experienced could help me out of that - by
giving any pros and cons on the following methods:
1. URL
2. Hidden fields
3.
I wander if here a way to create thumbnails using Perl?
I want to implement functionality for my shop program to create a
thumbnail of product pictures.
A good instance of it may be that of eBay. Users can upload a picture of
any dimension for their listing. EBay will automatically create a
Thanks for the link. I'll try Image::Magic::Thumbnail.
-Ursprüngliche Nachricht-
Von: WC -Sx- Jones [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 7. März 2004 16:08
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: Any CPAN module for creating thumbnails?
B. Fongo wrote:
I wander if here
: WC -Sx- Jones [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 7. März 2004 16:08
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: Any CPAN module for creating thumbnails?
B. Fongo wrote:
I wander if here a way to create thumbnails using Perl?
I want to implement functionality for my shop program
to you all guys
Babs
-Ursprüngliche Nachricht-
Von: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 18. Februar 2004 15:41
An: B. Fongo; [EMAIL PROTECTED]
Betreff: Re: AW: Need help to divert HTML print ETHL to file.txt
Hello,
Can you guys tell me on this piece
I thought I could solve the regex issue a different way, but failed.
My $path = Mazda.1.jpg ;
($file, $dir, $ext) = fileparse ($path, '\..*' );
#I'm trying to get Mazda.2.jpg and Mazda.3.jpg.
# $file contains Mazda, so why does this regex fail to deliver
Mazda.2.jpg
# and Mazda.3.jp?
my
I tried to divert the output of print EOF to a file.txt, but pern
warns of uninitialized value.
The filehandle below succeeded - so what is not initialized?
---
open (OUT, $dirhandle\$file) || die Can't create the html template:
I tried to divert the output of print EOF to a file.txt, but pern
warns of uninitialized value.
The filehandle below succeeded - so what is not initialized?
---
open (OUT, $dirhandle\$file) || die Can't create the html template:
Hello,
Can you guys tell me on this piece of codes? It doesn't print the small
html codes in the sub below. No warning - nothing!
N.B. Don't bother about the html; just check my perl codes to see why I
doesn't print what I want.
Thanks
Babs
Hello
I'm having tough time trying to solve a problem at some regex. I have
several pictures for cars, and want to use a script to create some HTML
files using those pictures.
For each car, I have three pictures named e.g. jeep.1.jpg, jeep.2.jpg
and jeep.3.jpg.
What am trying to do now, is to
The best way to do it; is using the standard module File::Basename.
For instance
use File::Basename;
# This should return somefile.
$file_name = basename (c:\test\abc\what\somefile.txt);
# This should also return c:\test\abc\what\
$dir_name = dir (c:\test\abc\what\somefile.txt);
# fileparse
You should use this: testscript.pl blah
where blah is the value to pass.
Ben Crane wrote:
Hi all,
Sorry, should have added this to my last email. Does
anyone know how to pass values to a perl script
through the command line? Do you use param as in CGI
scripting/
I want a user to be able to
I got it. I never thought indentation could cause sendmail to mess up.
As a beginner, I need you try
everything possible to know their pros and cons. Next time - I may
consider using a CPAN module.
:-)
Thanks
Wiggins d'Anconia wrote:
B. Fongo wrote:
It's my first time to use sendmail. I want
It's my first time to use sendmail. I want to my script to send a mail
to [EMAIL PROTECTED] or whoever is in the To: line. The script warns:No
recipient name found in the header and dies, even though there's a
recipient. I'm puzzled.
###
#!/usr/bin/perl -w
:
Wiggins D'Anconia wrote:
B. Fongo wrote:
I want to use mkdir(blah blah, o777), but want to first find out
whether the directory blah blah exists.
I'm not if the -e option will bw right here. Let's say:
unless (-e blah_blah) mkdir(blah_blah, 0777);
# Is this okay?
In general -e
Sometimes I don't answers to my questions; so I thought it might help -
posting to both list.
Next time, I'll remember to post to one list only.
Thanks a lot.
Wiggins d'Anconia wrote:
Please don't cross post, if your question is CGI based then use that
list, otherwise use the other...
B
I want to use mkdir(blah blah, o777), but want to first find out
whether the directory blah blah exists.
I'm not if the -e option will bw right here. Let's say:
unless (-e blah_blah) mkdir(blah_blah, 0777);
# Is this okay?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
I want to use mkdir(blah blah, o777), but want to first find out
whether the directory blah blah exists.
I'm not if the -e option will bw right here. Let's say:
unless (-e blah_blah) mkdir(blah_blah, 0777);
# Is this okay?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
I went back to my books to refresh my memory on how to use references. Your
suggestion help a lot, but the subroutine returns wrong values. I did
some small modifications on the codes below
, and tried it. It return perl-5.8.0-80.3.i386.rpm and
samba-2.2.7-5.8.0.i386.rpm, which is wrong
I went back to my books to refresh my memory on how to use references. Your
suggestion help a lot, but the subroutine returns wrong values. I did
some small modifications on the codes below
, and tried it. It return perl-5.8.0-80.3.i386.rpm and
samba-2.2.7-5.8.0.i386.rpm, which is wrong
Hi
I'm writing a script that will connect to an ftp server (Redhat mirror),
and download new versions of all packages that are on my machine. First
of all, the script collects information about all the packages installed
on my machine in an array (installed_packages). Then its goes on to get
Hi
I'm writing a script that will connect to an ftp server (Redhat mirror),
and download new versions of all packages that are on my machine. First
of all, the script collects information about all the packages installed
on my machine in an array (installed_packages). Then its goes on to get
What may be wrong with my codes? Perl complains of use of uninitialized
value at addition and in range (or flop).
Thanks
#
#!/usr/bin/perl -w
use strict;
my ($xi, $i, @numbers, @slice);
@numbers = (1..10);
$i = 0;
$xi = 0;
open(RS, perd.dat) || die
I'm quit confused with what I have below.
I have 2 database tables; Games and groups.
Name Group
#
John ,GroupA
Miler, GroupA
Peter, GroupB
Mathew, GroupB
Mark, GroupB
Luke, GroupA
I'm trying to select the members based on their groups and insert them
into a different
Hello
An argument passed to a subroutine returns wrong value.
Code example:
@x = (1..5);
$x = @x;
showValue ($x); # or showValue (\$x);
sub showValue {
my $forwarded = @_;
print $forwarded; # print ${$forwarded};
}
In both cases, the script prints out 1.
What is going on
:46
An: [EMAIL PROTECTED]
Betreff: Re: passing an argument to a subroutine
- Original Message -
From: B. Fongo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 11:34 AM
Subject: passing an argument to a subroutine
Hello
An argument passed
I'm quit confused with what I have below.
I have 2 database tables; Games and groups.
Name Group
#
John ,GroupA
Miler, GroupA
Peter, GroupB
Mathew, GroupB
Mark, GroupB
Luke, GroupA
I'm trying to select the members based on their groups and insert them
into a different
Hello
An argument passed to a subroutine returns wrong value.
Code example:
@x = (1..5);
$x = @x;
showValue ($x); # or showValue (\$x);
sub showValue {
my $forwarded = @_;
print $forwarded; # print ${$forwarded};
}
In both cases, the script prints out 1.
What is going on
Hello
Below is a portion of a script that displays a table. The argument
passed by param() determines the number of rows the table should
display.
For some unknown reason, the value of param() seem to behave strangely.
It at times the value does not change; even if a different number is
sent as
Hello
Below is a portion of a script that displays a table. The argument
passed by param() determines the number of rows the table should
display.
For some unknown reason, the value of param() seem to behave strangely.
It at times the value does not change; even if a different number is
sent
The original script has both -w and strict on, and no warnings are
generated. So everything is ok except param perhaps. The value of param
is some how sticky.
-Ursprüngliche Nachricht-
Von: Dan Muey [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 3. September 2003 20:00
An: B. Fongo
Hello
Below is a portion of a script that displays a table. The argument
passed by param() determines the number of rows the table should
display.
For some unknown reason, the value of param() seem to behave strangely.
It at times the value does not change; even if a different number is
sent
Hello
Below is a portion of a script that displays a table. The argument
passed by param() determines the number of rows the table should
display.
For some unknown reason, the value of param() seem to behave strangely.
It at times the value does not change; even if a different number is
sent
###
# Yupapa Web Hosting =^.^=
# Web Site - http://www.yupapa.com
# Email - [EMAIL PROTECTED]
###
B. Fongo [EMAIL PROTECTED]
???:[EMAIL PROTECTED]
Hi,
I've a small script intended for file transfer from a windows machine
to
a remote linux
###
# Yupapa Web Hosting =^.^=
# Web Site - http://www.yupapa.com
# Email - [EMAIL PROTECTED]
###
B. Fongo [EMAIL PROTECTED]
???:[EMAIL PROTECTED]
Hi,
I've a small script intended for file transfer from a windows machine
to
a remote linux
]
Gesendet: Donnerstag, 17. Juli 2003 14:07
An: 'B. Fongo'; [EMAIL PROTECTED]
Betreff: RE: Variable $q will not stay shared at
B. Fongo wrote:
Hello,
I'm working on my first Perl project. Most of my cgi programs work ok,
but a look at the apache error log reveals this warning which is
clear
Hello,
I'm working on my first Perl project. Most of my cgi programs work ok,
but a look at the apache error log reveals this warning which is clear
to me:
Variable $xy will not stay shared at /data/www/cgi-perl/envir.pl line
19. [Wed Jul 16 11:44:57 2003] [error] Undefined subroutine
Hello,
I'm working on my first Perl project. Most of my cgi programs work ok,
but a look at the apache error log reveals this warning which is clear
to me:
Variable $xy will not stay shared at /data/www/cgi-perl/envir.pl line
19. [Wed Jul 16 11:44:57 2003] [error] Undefined subroutine
Hi,
I've a small script intended for file transfer from a windows machine to
a remote linux server. To implement that, I decided to use two module
i.e File::Basename, File::Copy and CGI.pm.
The File::Copy is working well locally, but it fails to copy files to a
remote machine through the
Hi,
I've a small script intended for file transfer from a windows machine to
a remote linux server. To implement that, I decided to use two module
i.e File::Basename, File::Copy and CGI.pm.
The File::Copy is working well locally, but it fails to copy files to a
remote machine through the
;
}
die (Could not close output file. $! \n) unless close
(OUTPUT);
die (Could not close input file. $! \n) unless close (INPUT);
}
Thanks
B. Fongo
Is there any other way to check array uniqueness except the Module
Array::Unique?
I'm having problems in installing these two Modules: Array::Unique and
Tie. So I'm thinking of another way to check array for replicates.
I help will be appreciate. Thanks a lot!
--
To unsubscribe, e-mail:
59 matches
Mail list logo