object orientation :- please help

2002-01-18 Thread padu hagu
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

RE: Cgi on IIS

2002-01-18 Thread Gary Hawkins
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

Re: I cant run perl from the dos command line

2002-01-18 Thread Agustin Rivera
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

Re: Pattern Matching - Remove Alpha

2002-01-18 Thread Michael Fowler
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

object orientation in perl

2002-01-18 Thread padu hagu
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

RE: array and hash assignment

2002-01-18 Thread Christopher Solomon
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

RE: array and hash assignment

2002-01-18 Thread Jeff 'japhy' Pinyan
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 cant run perl from the dos command line

2002-01-18 Thread rabs
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

RE: array and hash assignment

2002-01-18 Thread amrit kumar
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..

RE: array and hash assignment

2002-01-18 Thread Hanson, Robert
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:

Re: Smart grep

2002-01-18 Thread sahraoma
Hello, Thank you John your code helps very well !!! Omar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

array and hash assignment

2002-01-18 Thread amrit kumar
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

RE: CGI-BIN Question

2002-01-18 Thread Hanson, Robert
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

CGI-BIN Question

2002-01-18 Thread Lance Prais
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]

Re: Modules needed for Validation

2002-01-18 Thread Yeung Siu
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]

RE: sample customer dbms in perl/mysql

2002-01-18 Thread Chris Spurgeon
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

Re: regex issues

2002-01-18 Thread Johnathan Kupferer
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 ">

Net::FTP fails on filenames with spaces

2002-01-18 Thread Joshua Colson
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

sample customer dbms in perl/mysql

2002-01-18 Thread William.Ampeh
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

Re: regex issues

2002-01-18 Thread Tanton Gibbs
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

Re: Form to Flat File

2002-01-18 Thread zentara
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 ###

regex issues

2002-01-18 Thread Yacketta, Ronald
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+)><(.+)> (.+) <(.+)>/)

RE: inetd client server communications

2002-01-18 Thread Bob Showalter
> -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

RE: hashing - cannot remember how :(

2002-01-18 Thread Hanson, Robert
"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

Re: hashing - cannot remember how :(

2002-01-18 Thread Jerry Preston
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

RE: hashing - cannot remember how :(

2002-01-18 Thread SathishDuraisamy
-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

RE: hashing - cannot remember how :(

2002-01-18 Thread Hanson, Robert
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 }";

hashing - cannot remember how :(

2002-01-18 Thread Jerry Preston
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

hashing - cannot remember how :(

2002-01-18 Thread Jerry Preston
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

inetd client server communications

2002-01-18 Thread henk b
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

creating labels in MS ACCESS

2002-01-18 Thread William.Ampeh
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

RE: IPC

2002-01-18 Thread Bob Showalter
> -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

Re: changing file attributes

2002-01-18 Thread Michael Stidham
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

RE: changing file attributes

2002-01-18 Thread Richard_Cox
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

Re: help with the backtick operator

2002-01-18 Thread Jenda Krynicky
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 >

PERLDB_OPTS

2002-01-18 Thread Babichev Dmitry
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 .

IPC

2002-01-18 Thread Ryan Guy
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

RE: PERLDB_OPTS

2002-01-18 Thread Bob Showalter
> -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

RE: module directory problem

2002-01-18 Thread Bob Showalter
> -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

PERLDB_OPTS

2002-01-18 Thread Babichev Dmitry
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

module directory problem

2002-01-18 Thread Yeung Siu
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

changing file attributes

2002-01-18 Thread Miller, Jeremy T.
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

Re: using the system function

2002-01-18 Thread Jon Molin
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

help with the backtick operator

2002-01-18 Thread Matthew Weier O'Phinney
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

Cgi on IIS

2002-01-18 Thread maureen
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

using the system function

2002-01-18 Thread lospalomares
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

Re: How to make it more perlish

2002-01-18 Thread Briac Pilpré
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

Re: How to make it more perlish

2002-01-18 Thread Frank
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=(

Re: DBD_ACCESS

2002-01-18 Thread Briac Pilpré
=?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

Re:How to make it more perlish

2002-01-18 Thread Jorge Goncalvez
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

RE: Regex Assistance

2002-01-18 Thread John Edwards
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

DBD_ACCESS

2002-01-18 Thread yun yun
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!? µ

Re: how to set the env var?

2002-01-18 Thread Jon Molin
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