hi,
I am newbie at Perl.
I have written the following code in perl :-
sub point { # point(x,y) constructor
my ($x, $y) = @_;
return (
'x' => $x, # components
'y' => $y,
'show' => sub { # display method
my %p = @_;
print "point at $p{'x
Maybe the file name has a .cgi extension? .cgi is not set for exeeute by
default. Try renaming it .pl assuming you installed ActivePerl. Or in
Internet Services Manager right click the scripts folder, and take a look at
the instructions in the attached mail of few days ago. I'm figuring that'l
Path in your autoexec.bat file?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "rabs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 3:32 PM
Subject: I cant run perl from the dos command line
>
> I am running Ac
On Wed, Jan 16, 2002 at 09:51:45PM -0500, Tanton Gibbs wrote:
> Michael brings up a good point...for this problem, you would probably be
> better served by tr
>
> $stat =~ tr/a-zA-Z//d;
>
> will delete any alpha character.
>
> Although split will do the job, I think tr would be a more "idiomati
hi,
I am newbie at Perl.
I have written the following code in perl :-
sub point { # point(x,y) constructor
my ($x, $y) = @_;
return (
'x' => $x, # components
'y' => $y,
'show' => sub { # display method
my %p = @_;
print "point at $p{'x
On Fri, 18 Jan 2002, [iso-8859-1] amrit kumar wrote:
> hi,
>
> what i want to proove is...supposer that i assign an
> array @a = (1,2); and then i define another array @b
> which is equal to @a.I have to proove that this is
> done by assigning a copy of array @a to @b rather than
> by refere
On Jan 18, amrit kumar said:
>what i want to proove is...supposer that i assign an
>array @a = (1,2); and then i define another array @b
>which is equal to @a.I have to proove that this is
>done by assigning a copy of array @a to @b rather than
>by reference.
To determine if two variables point
I am running ActivePerl 5.61.629 on Windows 98. It worked fine until
yesterday but now I can't run any scripts from the DOS command line.
I have attempted to run the example.pl script
C:Perl\eg>perl example.pl
I get the error message.
Bad command or file name
However the CGI bin on my Xitami
hi,
what i want to proove is...supposer that i assign an
array @a = (1,2); and then i define another array @b
which is equal to @a.I have to proove that this is
done by assigning a copy of array @a to @b rather than
by reference.
Can you help me do that...i am bit confused ..
thanks a lot..
You want to see if a scalar is actually a scalar or a ref?
Try this...
if ( ref $var ) {
# It's a reference!
}
else {
# It's not a reference
}
Rob
-Original Message-
From: amrit kumar [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 6:14 PM
To: [EMAIL PROTECTED]
Subject:
Hello,
Thank you John your code helps very well !!!
Omar
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hi,
howto to proove that array and hash assignments are
made by using cloning and not by reference in perl.
I am a newbie at perl and have no idea howoto to do
it.
need help
have a good day
cheers,
amrit.
__
Do You Yahoo!?
Everything
A web server and a scripting language (I assume you were planning on using
Perl).
Some will suggest Apache (www.apache.org), and other will suggest IIS. Then
you need ActiveState's ActivePerl (www.activestate.com), or some other Win32
port, Cygwin might work.
Then you just need to set it up. I
What do I need to do to run CGI Scripts on a NT box?
Thank you
Lance
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
You can use regular expressions to verify them.
--- Connie Chan <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there any module can use to verify data type (String, Integer, floating, Hex,
>valid email
> address, valid url etc.) ?
> Thank you very much.
>
>
=
Yeung Siu
[EMAIL PROTECTED]
If you just need to show them a pre-existing site that uses Perl and mySQL,
SlashDot (www.slashdot.org) is a fine example. They have details of their
setup posted at http://slashdot.org/faq/tech.shtml#te050
There are also lots of examples on the MySQL official website at
www.mysql.com
Try:
/\[GUARD\] ([^<>]+)<(\d+)><(\d+)><([^<>]+)> ([^<>]+) <({^<>]+)>/
To limit the characters you were matching with '.' to anything but angle brackets or:
/\[GUARD\] (.+?)<(\d+?)><(\d+?)><(.+?)> (.+?) <(.+?)>/
To cause the matching to be non-greedy and not swallow up the ">
Can someone help me, I need to retrieve files with spaces in them, and
Net::FTP errors out everytime.
I've tried embedding quotes, not storing name in variable, quoting/not
quoting variables. I'm at a loss.
I thought that maybe I could convert the spaces to something, much like a
webserver conv
Hello,
I have just been asked to come up with Perl/Mysql demo on Monday.
Considering the short notice, I was wondering if anyone can point me to a
freeware
WEB-base database system implemented in Perl and Mysql.
Thank you.
__
William Ampeh (x3939)
Federal Reserve Board
--
To
You have one .+ that is not surrounded by <> If you only want what is
between <> then you should surround it with <>
$line =~ /\[GUARD\].+<(\d_)><(\d+)><(.+)><(.+)><(.+)>.+<(.+)>/;
- Original Message -
From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
To: "Beginners (E-mail)" <[EMAIL PROTECTED
On Thu, 17 Jan 2002 14:01:28 -0700, [EMAIL PROTECTED] (Aaron White) wrote:
>Does anyone have a simple script that can handle about ten fields from a basic html
>form, that can be written to a flat file.
Here's a simple one that will save all params to a pipe=delimited fat-text file.
zz.cgi
###
Folks,
I have the following log line
[GUARD] ux234<870><1764517><13.231.232.72> IMP
here is the regex I am attempting to use
# $1 $2$3 $4$5
$6
elsif ( $line =~ /\[GUARD\] (.+)<(\d+)><(\d+)><(.+)> (.+) <(.+)>/)
> -Original Message-
> From: henk b [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 18, 2002 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: inetd client server communications
>
>
> I'm trying to make an inetd perl server to communicate with a
> perl client.
> Communication from client
"I guess the expression should be $data{week}->{$rows} since it is a
reference. Right?"
I usually use the -> operator so that it sticks out, but either should work.
I don't think there is any performance benefit, so it is just a matter of
preference. The same goes when dereferencing, %$data{week
Robert,
Sorry about the" no data", but your code worked!!
Thanks,
Jerry
"Hanson, Robert" wrote:
> Try this. You didn't provide any sample data, so this is untested.
>
> $data{ week } = \%week_day_date;
> $data{ eng } = \%eng_info;
>
> &build_table_date( 5, %data );
>
> sub build_table_date
-Original Message-
From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
Try this. You didn't provide any sample data, so this is untested.
$data{ week } = \%week_day_date;
$data{ eng } = \%eng_info;
&build_table_date( 5, %data );
sub build_table_date {
my( $rows, %data ) = @_;
fore
Try this. You didn't provide any sample data, so this is untested.
$data{ week } = \%week_day_date;
$data{ eng } = \%eng_info;
&build_table_date( 5, %data );
sub build_table_date {
my( $rows, %data ) = @_;
foreach $row ( 1..$rows ) {
print"rows $row $rows $data{ week }{ $rows }";
Hi,
This is DUMB, but I cannot remember how?
I have two hashes and I want to pass them:
$data{ week } = %week_day_date;
$data{ eng } = %eng_info;
&build_table_date( 5, %data );
then:
sub build_table_date {
my( $rows, %data ) = @_;
foreach $row ( 1..$rows ) {
print"rows $row
Hi,
This is DUMB, but I cannot remember how?
I have two hashes and I want to pass them:
$data{ week } = %week_day_date;
$data{ eng } = %eng_info;
&build_table_date( 5, %data );
then:
sub build_table_date {
my( $rows, %data ) = @_;
foreach $row ( 1..$rows ) {
print"rows $row
I'm trying to make an inetd perl server to communicate with a perl client.
Communication from client to server is working but not from server to
client. As I understand inetd handles the socket, bind, listen and accept
stuff and basically you can communicate between server and client using
STD
Hello all,
This might not be the right place for this question, but I trust this
group.
My boss wants me to create a mailing list from
his MS ACCESS database. I am not an MS fun, but I cannot tell him this.
So my question is how do I create labels from an ACCESS database.
Thanks
> -Original Message-
> From: Ryan Guy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 18, 2002 9:20 AM
> To: '[EMAIL PROTECTED]'
> Subject: IPC
>
>
> I was wondering if anyone could point me in the direction of
> a good perl ipc
> tutorial (other than perldoc). Also any perlscript s
Jeremy,
You could try something like this:
my $Attributes = 32;
$path = "L:\\Flu\\StData\\";
foreach $e ( <$path\\*.*> ) {
Win32::File::SetAttributes ($path, NORMAL);
}
>From: "Miller, Jeremy T." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: changing file attributes
>Date: Thu, 17 Jan 200
On 17 January 2002 19:34, Miller, Jeremy T. [mailto:[EMAIL PROTECTED]] wri=ote:
> What I would like to do is have Perl to remove the read-only
> attribute for all of the files that I put
> in a certain folder (e.g., L:\Flu\StData\).
For once, don't use perl.
cd L:\Flu\StData
attrib/s -r *.*
(Th
From: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]>
> Basically, I have the following question(s) about the backtick operators:
> In a scalar string context, will a shell command called by the backtick
> operator return ALL lines? i.e., if egrep returns multiple lines, will
>
Hello beginners,
>> How i can change environment variables (e.g. PERLDB_OPTS) to any
>> values so they remained general(public) for all instances of perl
>> scripts?
BS> Typically you accomplish this kind of thing by setting the variable in
BS> some kind of shell initialization script like .
I was wondering if anyone could point me in the direction of a good perl ipc
tutorial (other than perldoc). Also any perlscript sites or using c/c++ in
perl would be appreciated too. Thanks in advance.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
> -Original Message-
> From: Babichev Dmitry [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 01, 2001 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: PERLDB_OPTS
>
>
> Hello beginners,
>
> How i can change environment variables (e.g. PERLDB_OPTS) to any
> values so they remained gene
> -Original Message-
> From: Yeung Siu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 17, 2002 5:48 PM
> To: [EMAIL PROTECTED]
> Subject: module directory problem
>
>
> Hi all,
>
> I have problem with directory environment. The scripts
> are on a NT system using Active Perl v5.6.1
Hello beginners,
How i can change environment variables (e.g. PERLDB_OPTS) to any
values so they remained general(public) for all instances of perl
scripts?
$ENV{'PERLDB_OPTS'}="LocalPort"; # working only for currently running
script.
Sincerely yours,
Babichev Dmitry.
--
To unsubscrib
Hi all,
I have problem with directory environment. The scripts
are on a NT system using Active Perl v5.6.1. I have
one script at
foo\test.pl
and use package at
tools\tools.pm
I imported the tools.pm to test.pl during this
# in test.pl script
use lib '../tools';
use TOOLS;
The tools.pm ha
I'm receiving several hundred data files from from several states via
CD-ROM. When these files are copied to my hard drive or network storage,
the read-only attribute remains on the file. What I would like to do is
have Perl to remove the read-only attribute for all of the files that I put
in a
if you aren't interesed in weather it works or not, why not try
system("/usr/local/bin/scp file $system:/home &");
/jon
lospalomares wrote:
>
> I am trying to scp a file to various systems, but the
> script hangs if the scp command to one of the systems
> fails. Is there a way in perl to spe
I'm trying to call egrep from a perl script using the backtick operator
-- I need to parse the output from egrep to see if additional information
is contained, something like:
$parseFile = `egrep -d skip \\/dev/null`
if ($parseFile =~ /method\s*=\s*\"?post/ ) { do this; }
(I realize I could prob
I hope someone can help me out.
I set up this cgi file and html form on a Unix server. The script
changes a user's password in a text file.
This works correctly on a Unix Server. However, I need to move these
files to an IIS server.
In testing on the IIS server, I get an HTTP Error 405- Method
I am trying to scp a file to various systems, but the
script hangs if the scp command to one of the systems
fails. Is there a way in perl to specify that if the
scp command doesn't work to skip it and continue with
the next system? I have the following:
:
:
use Net::Ping;
@systems = qw(system1
In article <[EMAIL PROTECTED]>, Frank wrote:
> On Fri, Jan 18, 2002 at 11:39:11AM +0100, Jorge wrote:
> my @PROG=(
> "c:\\OXE\\cygwin\\bootp\\linux\\$_Globals{LX_VERSION}",
> 'c:\\OXE\\cygwin\\bootp\\linux\\install', 'etc...');
If you want to be a little more pe
On Fri, Jan 18, 2002 at 11:39:11AM +0100, Jorge wrote:
> Hi, I have this piece of code and i wanted to simplify it and make it more
> perlish.
> thanks
Ok,
Howabout?
Use an array for the items.
Making the code more scalable by replacing each call with a loop?
my @PROG=(
=?Gb2312?Q?Yun=20yun?= wrote:
> I want to do a small test on database in perl using MS
> Access database, but I find there is no DBD_ACCESS in
> the DBI.pm, should I download it from somewhere? the
> same thing with the database DB2 and other database.
> Thanks!
To use DBI with MS Access databas
Hi, I have this piece of code and i wanted to simplify it and make it more
perlish.
thanks
&cbkRedrawLink()
sub cbkRedrawLink()
{
my $PROG="c:\\OXE\\cygwin\\bootp\\linux\\$_Globals{LX_VERSION}";
my $PROG2="c:\\OXE\\cygwin\\bootp\\linux\\install";
my $PROG3="c:\\OXE\\cygwi
Thanks. That did the trick. Much appreciated.
John
-Original Message-
From: Joshua Colson [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2002 17:58
To: '[EMAIL PROTECTED]'
Subject: RE: Regex Assistance
I've commented out two lines in your code and replaced them with mine.
I think it shou
I want to do a small test on database in perl using MS
Access database, but I find there is no DBD_ACCESS in
the DBI.pm, should I download it from somewhere? the
same thing with the database DB2 and other database.
Thanks!
_
Do You Yahoo!? µ
Read 'perldoc DBI'
As a convenience, if the $data_source parameter is
undefined or empty the DBI will substitute the value
of the environment variable DBI_DSN. If just the
driver_name part is empty (i.e., data_source prefix is
'dbi::') the e
53 matches
Mail list logo