Re: Splitting variable...

2002-02-20 Thread Deen Hameed
# split works on whitespace by default @somearray = split $string; deen -- Deen Hameed, Accidental Programmer [EMAIL PROTECTED] On Thu, 21 Feb 2002, Daniel Falkenberg wrote: > Hey all, > > I am working with a variable at the moment where I want it to be split > at every 'space' such as ... >

RE: Finding numbers ONLY in a variable

2002-02-20 Thread Timothy Johnson
Try using these metacharacters when testing for types: \d digits(0-9) \s whitespace(' ',\t,etc.) \w 'word' characters (a-zA-Z_,etc.) -Original Message- From: Daniel Falkenberg To: [EMAIL PROTECTED] Sent: 2/20/02 7:52 PM Subject: Finding numbers ONLY in a variable h

Activer Perl Modules

2002-02-20 Thread Daniel Falkenberg
Just wondering if any one has seen this error before when installing a Active Perl Module. I have RTFM. I have run... c:\ppm then... PPM>install HTML-TableExtract.ppd but then I recieve the following error... Error installing package 'HTML-TableExtract.ppd': Error reading ../MSWin32-x86-mu

Re: Finding numbers ONLY in a variable

2002-02-20 Thread Jeff 'japhy' Pinyan
On Feb 21, Daniel Falkenberg said: >Sorry to keep approaching you with my regex problems, but I really >havn't had time to read up on them yet. > >Is it possible to get a regex to say ... "hang on I only want numerals >in my variable. I am now going to print an error :)" You're not the only one

Finding numbers ONLY in a variable

2002-02-20 Thread Daniel Falkenberg
hi again all, Sorry to keep approaching you with my regex problems, but I really havn't had time to read up on them yet. If I have a variable... $var = "dfasdf"; Is it possible to get a regex to say ... "hang on I only want numerals in my variable. I am now going to print an error :)" if ( $

RE: Opposite of $respose->is_success

2002-02-20 Thread Timothy Johnson
What about this: if(!$response->is_success); -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 7:30 PM To: [EMAIL PROTECTED] Subject: Opposite of $respose->is_success Hey all, Just wondering if any one know what the oposite of $r

Opposite of $respose->is_success

2002-02-20 Thread Daniel Falkenberg
Hey all, Just wondering if any one know what the oposite of $response->is_success in the code below? I have tried $response->is_fail and $response->is_failure. I have also RTFM but I can't find anywhere what the opposite is. What I essentially want to do is if the site or page ($inputsite) can

Re: ActiveState Win32 Port of Perl.

2002-02-20 Thread Tanton Gibbs
you might try binmode OUTPUT; - Original Message - From: "Kingsbury, Michael" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2002 6:07 PM Subject: ActiveState Win32 Port of Perl. > I'm reading in a Unix-style (terminated) file to change one line. However, > the

Passing dynamically created form fields into data structure

2002-02-20 Thread Keith A. Calaman
I am building a project to track short track auto racing results. The initial form below is displayed to a user where they select a race and input how many cars started the race. The following script dyanamically creates select boxes equal in number to the amount of cars starting the race. The

Re: Get rid of digits...

2002-02-20 Thread John W. Krahn
Daniel Falkenberg wrote: > > Hey all, Hello, > Just wondering what my best way would be to go about stripping all > digits from my string. So far I have the follwoing... > > $string = "08 852365 21 Hello world!"; > > $string =~ s/[.*\d\s]//g; > > What does this do exactly? [] denotes a cha

Re: Get rid of digits...

2002-02-20 Thread Leon
- Original Message - From: "Daniel Falkenberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Just wondering what my best way would be to go about stripping all digits from my string. So far I have the follwoing... $string = "08 852365 21 Hello world!"; $string =~ s/[.*\d\s]//g; I believe

RE: Get rid of digits...

2002-02-20 Thread Timothy Johnson
I guess I should have written it like this then: $string =~ s/\d+\s+//g; #one or more digits followed by one or more spaces -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 5:05 PM To: Timothy Johnson Subject: RE: Get rid of digit

RE: Get rid of digits...

2002-02-20 Thread Timothy Johnson
Okay, looking at it more closely, I think what you have there removes all digits AND whitespace characters. Is that what you were trying to do? or were you looking for something more like this: $string =~ s/\d+\s//g; Which will remove one or more digits followed by one space (so you don't end

RE: Get rid of digits...

2002-02-20 Thread Timothy Johnson
I'm not sure exactly what that is doing (I'm just learning about character classes), but if all you want to do is remove digits, try this: $string =~ s/\d//g; #substitute all digits globally with nothing -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednes

RE: perldoc manual

2002-02-20 Thread Pradeep Sethi
do : perldoc -f push print function help -Original Message- From: Scott Lutz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:32 PM To: Beginners (E-mail) Subject: perldoc manual Where can one find a good reference to the perldocs? I want to find out about "push", so I

Re: perldoc manual

2002-02-20 Thread Daniel Gardner
Thursday, February 21, 2002, 12:31:45 AM, Scott Lutz wrote: > Where can one find a good reference to the perldocs? > I want to find out about "push", so I tried : perldoc list ->> No documentation found for "push". perldoc array ->> No documentation found for "array". perldoc list ->> No documen

Get rid of digits...

2002-02-20 Thread Daniel Falkenberg
Hey all, Just wondering what my best way would be to go about stripping all digits from my string. So far I have the follwoing... $string = "08 852365 21 Hello world!"; $string =~ s/[.*\d\s]//g; What does this do exactly? Regards, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

RE: perldoc manual

2002-02-20 Thread Timothy Johnson
You should be able to find it in the perlfunc section of the documentation. -Original Message- From: Scott Lutz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:32 PM To: Beginners (E-mail) Subject: perldoc manual Where can one find a good reference to the perldocs? I wa

perldoc manual

2002-02-20 Thread Scott Lutz
Where can one find a good reference to the perldocs? I want to find out about "push", so I tried : perldoc list -> No documentation found for "push". perldoc array -> No documentation found for "array". perldoc list -> No documentation found for "list". Scott Lutz Pacific Online Support Phone:

RE: Splitting variable...

2002-02-20 Thread Daniel Falkenberg
Paresh, Why doesn't this work then... $string = "Business&PersonalFAD AFD:test(Regional)"; @line = split/\s+/, $string; Now $line[1] prints nothing? Am I doing something wrong here? Dan -Original Message- From: Paresh Kakrecha [mailto:[EMAIL PROTECTED]] Sent: Thursday, 21 February 2

Re: Splitting variable...

2002-02-20 Thread Paresh Kakrecha
What you are doing is correct. -paresh. At 10:20 AM 2/21/2002 +1030, Daniel Falkenberg wrote: >Hey all, > >I am working with a variable at the moment where I want it to be split >at every 'space' such as ... > >$string = "the quick brown fox"; > >How would I go about doing this? Would I do somet

Splitting variable...

2002-02-20 Thread Daniel Falkenberg
Hey all, I am working with a variable at the moment where I want it to be split at every 'space' such as ... $string = "the quick brown fox"; How would I go about doing this? Would I do something like the following... @line = split/\s+/, $string; $line[0] = the $line[1] = quick $line[2] = br

Re: Redirect output from system command to a file

2002-02-20 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > I am attempting to redirect the output from a system > command to a file, however when I print it only goes to You shouldn't be using system() for this, you should be using back-quotes or the qx() function. > stdout and I get 0's in the file. The first loop works

Re: learning perl

2002-02-20 Thread Arul, Rex (NEA-IMAP)
Windows 2000 Professional OS does not come with IIS 5.0 (Internet Information Services ) services installed by default. Check if you have IIS 5.0 on your system. ActivePerl, by default installs and configures the PerlScript for ASP (Active Server Pages) as well as necessary registry entries fo

Re: Unix commands in Perl scripts

2002-02-20 Thread Paresh Kakrecha
system( "cat myfile"); or qx( cp file1 file2); At 03:16 PM 2/20/2002 -0800, John W. Krahn wrote: >Tony Ho wrote: > > > > Hi guys > >Hello, > > > I was wondering if anyone knows how to execute Unix commands in a Perl > > Script ? > > >use Shell; > >my $ps = ps( 'ax' ); >print $ps; > >my @ls = ls

RE: learning perl

2002-02-20 Thread Aaron Shurts
Post some sample code. Let's see what you are trying to do. -_-Aaron -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 2:50 PM To: [EMAIL PROTECTED] Subject: learning perl I've installed ActivePerl 5.61 on Win2000, the PATH and associations

Re: Unix commands in Perl scripts

2002-02-20 Thread John W. Krahn
Tony Ho wrote: > > Hi guys Hello, > I was wondering if anyone knows how to execute Unix commands in a Perl > Script ? use Shell; my $ps = ps( 'ax' ); print $ps; my @ls = ls( '-al' ); print $ls[ 7 ]; perldoc Shell John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL

RE: learning perl

2002-02-20 Thread Wagner-David
Need more info. What are you trying to do that leads you to say they are not doing anything? Especially since you state the PATH and associations work fine. Wags ;) -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 14:50 To: [EMAIL PROTE

Re: Simple Perl Ping Sweep (Windoze)

2002-02-20 Thread Johnathan Kupferer
Ted Lee wrote: >Hey guys, > >I've been playing with Perl, and I've built a simple ICMP Ping sweep program >that accepts start and end IP, and pings every host in between. > >Question I have is, I want to reduce the time it takes to do so, I was >considering spawning a processes for X number of ho

Fwd: Re: Sending email via Postfix

2002-02-20 Thread James Taylor
Hmm, I'm not 100% sure whether or not it comes with this in Mandrake or not, but if you download postfix and compile it (or install the package I suppose) it comes with a binary called 'sendmail' which is basically used for this purpose. So, you might want to just do a 'locate sendmail'. Maybe yo

learning perl

2002-02-20 Thread Dave
I've installed ActivePerl 5.61 on Win2000, the PATH and associations work just fine, but the scripts don't seem to be doing anything. Is there anything else I need? My ISP won't let me play around with scripts on their servers, so I wanted to be able to play with them on my own system. Thank

ActiveState Win32 Port of Perl.

2002-02-20 Thread Kingsbury, Michael
I'm reading in a Unix-style (terminated) file to change one line. However, the output is with DOS mode Ctrl-Ms... anyone know how to prevent this? With the exception of the match, I'm pretty much doing while ( ) { print OUTPUT $_; } and getting the Ctrl-Ms... -mike -- To u

RE: Problem With Make on Solaris 8 (Date-Calc-5.0)

2002-02-20 Thread Mark Richmond
The Makefile can't find gcc make sure it's in your path and rerun configure > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 20, 2002 9:38 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Problem With Make on Solaris 8 (

Sending email via Postfix

2002-02-20 Thread Kevin Old
Hello all, I have a Mandrake 8.1 box running Postfix. I have a few CGI's that need to send email. I have always used Sendmail and have been come stumped with this line in my script after swtiching to postfix: # * NAME (AND LOCATION) OF THE SERVER MAIL PROGRAM * # Enter the name of your

Re: Object Question

2002-02-20 Thread Brett W. McCoy
On Wed, 20 Feb 2002, phinney wrote: > I have an object method that allocates quite a bit of memory through > fillung up an array. I then pass that array back to the calling > program. Now, if I destroy the array that I passed back (though an > undef), the memory still seems to be allocated by

Object Question

2002-02-20 Thread phinney
I have an object method that allocates quite a bit of memory through fillung up an array. I then pass that array back to the calling program. Now, if I destroy the array that I passed back (though an undef), the memory still seems to be allocated by the object. I can reuse it (through meth

Re: bleedperl , Berkeley DB-4, BerkeleyDB

2002-02-20 Thread Elaine -HFB- Ashton
Dean Theophilou [[EMAIL PROTECTED]] quoth: *>Hello: *> *> I'm interested in finding out more about what's planned in Perl 5.8. Could *>someone direct me to the proper site? Thanks. perldelta.pod in the 5.7.x distributions will tell you or you can find it http://www.hut.fi/~jhi/perldelta.po

RE: Timestamp and File::find

2002-02-20 Thread J . Hourihane
my apologies running low on fuel I want to get a timestamp on files i.e. last modified i.e. find /tmp -mtime -1 -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:34 PM To: Hourihane, Jaime; [EMAIL PROTECTED] Subject: RE: Timestamp an

Redirect output from system command to a file

2002-02-20 Thread slhgkh5
I am attempting to redirect the output from a system command to a file, however when I print it only goes to stdout and I get 0's in the file. The first loop works find the second is what is failing. I have even tried redirecting within the system function ( system " command > /home/file")

Re: Illegal seek

2002-02-20 Thread William.Ampeh
I have lost track from who this was originally sent, but this is what I think is wrong with your script (the original script). 1. open requires 2 arguments, you had 1. So you may want to re-write your open stmt as: open FTPSCR, "|ftp -n -v $hostname > ftplog\n"; #insert a comma As a precaut

RE: bleedperl , Berkeley DB-4, BerkeleyDB

2002-02-20 Thread Dean Theophilou
Hello: I'm interested in finding out more about what's planned in Perl 5.8. Could someone direct me to the proper site? Thanks. Dean -Original Message- From: Elaine -HFB- Ashton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 11:49 AM To: zentara Cc: [EMAIL PROT

RE: Timestamp and File::find

2002-02-20 Thread Nikola Janceski
Your question is incomplete. Do you want the modify/inode/access time? Do you want to do something with it to test with it? etc. Please rephrase your question to be more coherent. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:3

Re: Timestamp and File::find

2002-02-20 Thread J . Hourihane
can one specicify a time stamp when using FileFind? use File::Find; open(OUT, ">docs2.out"); print "Printing To docs2.out..\n"; sub wanted { print OUT "$File::Find::name\n"; } find( \&wanted, "//dfspn1/dfs/shared/CITG"); close(OUT); Jaime Hourihane CDC-IXIS 212.891

RE: Grep function inside a for loop does NOT grep the values.

2002-02-20 Thread Satya_Devarakonda
Thanks again... Satya "Brett W. McCoy"

RE: Grep function inside a for loop does NOT grep the values.

2002-02-20 Thread Brett W. McCoy
On Wed, 20 Feb 2002 [EMAIL PROTECTED] wrote: > Thank you - it worked. I got my output as expected. But why is '\n' > considered so bad in perl unlike shell scripting. Why did I not get the > output with '\n'. Just curious!!! It's not considered bad, but it can mess up things when you are trying

RE: Grep function inside a for loop does NOT grep the values.

2002-02-20 Thread Satya_Devarakonda
Hi, Thank you - it worked. I got my output as expected. But why is '\n' considered so bad in perl unlike shell scripting. Why did I not get the output with '\n'. Just curious!!! Satya

Re: Dates Perl & SQL7

2002-02-20 Thread mike
On Wed, 2002-02-20 at 11:26, Mason, Andrew wrote: > This is a concept question rather than a code question. > > I have a script which produces a simple report on some simple disk space > stats for servers I work with. > I thought it would be useful to put this information into a database on > a d

Re: Illegal seek

2002-02-20 Thread Johannes Franken
On Tue, Feb 19, 2002 at 12:05:40PM -, Tony McGuinness wrote: > I am getting the following: > cannot execute ftpscr Illegal seek at ./getfile.pl line 31. Here's what's wrong with your script: 1.) You forgot to close the file before executing it. So the system() would find an empty script

Sending email from Perl Script

2002-02-20 Thread Russell Boyd
I need to send notifications from a perl script I am building. I can use a system call for mailx. But I am wondering if there is a better way. Are there am\ny modules or packages which would address this? Thanks, Russell -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Re: Fwd: What is the value of @_4_[0], and $return_me? (see below)

2002-02-20 Thread Michael Fowler
On Wed, Feb 20, 2002 at 04:45:27PM +0200, Bruce Ambraal wrote: > Fwd: What is the value of @_$_[0], and $return_me? (see below) What is @_$_[0] ? In Perl it's a syntax error. Perhaps you could expand on what you're asking. Also, I don't see how this is a CGI question, so I've removed the Cc: t

Re: bleedperl , Berkeley DB-4, BerkeleyDB

2002-02-20 Thread Elaine -HFB- Ashton
zentara [[EMAIL PROTECTED]] quoth: *> *>All my searches on the net seem to indicate that bleedperl *>is the "latest version"; but the BerkeleyDB docs say *>it will need only perl version 5.004; and I have v5.6.0. Oh..I misread that. If http://search.cpan.org/search?dist=BerkeleyDB is the module y

Re: Matching a variable against nothing

2002-02-20 Thread Michael Fowler
On Wed, Feb 20, 2002 at 02:53:20PM +1030, Daniel Falkenberg wrote: > if ( $string eq '' ) { > print "String contains nothing"; > } else { > print "The string contains the following: $string"; > } > > Is this correct? Have you tried it? Yes, it's correct. A much easier way to determine if a

Re: bleedperl , Berkeley DB-4, BerkeleyDB

2002-02-20 Thread Elaine -HFB- Ashton
zentara [[EMAIL PROTECTED]] quoth: *>I'm trying to install the newest version of *>Berkeley DB, and get the perl module *>for it going. *> *>I'm getting an error saying "bleedperl not found". *> *>All my searches on the net seem to indicate that bleedperl *>is the "latest version"; but the Berkel

Re: Sending Mail

2002-02-20 Thread Elaine -HFB- Ashton
Bhanu Prakash [[EMAIL PROTECTED]] quoth: *>Hi, *> I'm new to Perl and am trying to write some cgi *>programs in Perl. *>Currently I'm developing a tool in which , when a user *>submits a form, *>the input entered by him should be mailed to the *>address he specifies *>in one of teh input file

Re: Problem With Make on Solaris 8 (Date-Calc-5.0)

2002-02-20 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *>I received the following error while attempting to install Date-Calc-5.0 on *>Solaris 8. Date-Calc-4.3 behaves the same way. However, I'm able to do a *>make successfully of both packages on Solaris 2.5.1. gcc is installed on *>both platforms. Could y

Upload problem

2002-02-20 Thread anthony
Hi, i have the following thing, i know $picture and $pictures are not empty and has the path to the C drive But the script doesn't read the file i don't know why? $save_location is a good path. IF you know where is the error please tell me Thanx SCRIPT BELOW if ($picture =~ /([^\/\\]+)$/) {

Simple Perl Ping Sweep (Windoze)

2002-02-20 Thread Ted Lee
Hey guys, I've been playing with Perl, and I've built a simple ICMP Ping sweep program that accepts start and end IP, and pings every host in between. Question I have is, I want to reduce the time it takes to do so, I was considering spawning a processes for X number of hosts to ping. So, say I

bleedperl , Berkeley DB-4, BerkeleyDB

2002-02-20 Thread zentara
Hi, I'm trying to install the newest version of Berkeley DB, and get the perl module for it going. I'm getting an error saying "bleedperl not found". All my searches on the net seem to indicate that bleedperl is the "latest version"; but the BerkeleyDB docs say it will need only perl version 5.

Re: reading dbf files

2002-02-20 Thread Jenda Krynicky
From: Hal Johnson <[EMAIL PROTECTED]> > I was wondering how to read in a dbf file. I understand how to read > ..csv files, but I would like to be able to not have to convert the > many dbf's to csv's. > > Thanks, > Hal use DBI with DBD::XBase or DBD::ODBC. Jenda P.S.: Come fo

Re: How to send html email from a linux box to recipents who use outl ook 2k

2002-02-20 Thread Jenda Krynicky
From: "FLAHERTY, JIM-CONT" <[EMAIL PROTECTED]> > Hello , I have a perl script thats sends dept managers active adp > trouble > calls to there email, is there a way I can send them in HTML format > instead of text . I use redhat 7.1 , my users use outlook 2k on win 2k Use ei

RE: Question Regarding Pattern Matching and ARGV

2002-02-20 Thread Nikola Janceski
Mike, I see your problem, (I really didn't the code, but it made it more obvious when I looked at it). If you are going to try to pass a TWO word argument to be used in the pattern match you need to do the command line as so: script.pl arg0 arg1 "field vendno" now @ARG[2] is "field vendno" wher

reading dbf files

2002-02-20 Thread Hal Johnson
Hello, I was wondering how to read in a dbf file. I understand how to read ..csv files, but I would like to be able to not have to convert the many dbf's to csv's. Thanks, Hal __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games ht

RE: Question Regarding Pattern Matching and ARGV

2002-02-20 Thread Nikola Janceski
I don't see a problem with your first example: $Line = "Hey there look it works"; if ($Line =~ /@ARGV[2]/i){ print "True\n"; } if the script is called pl.pl then the following happens: $ pl.pl arg0 arg1 THERE True $ pl.pl arg0 arg1 crap but if @ARGV[2] is nothing (ie "") then /

Question Regarding Pattern Matching and ARGV

2002-02-20 Thread Michael Pastore
> Hello All, > > This is my first posting to this Peg, please excuse any protocol ... > > I am currently working on a Perl Script and trying to do a pattern match > within an If, like: > > if ($Line =~ /field vendno/i)searching for string "field vendno" . > > but instead of hard-coding the

RE: Unix commands in Perl scripts

2002-02-20 Thread Brett W. McCoy
On Wed, 20 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote: > You simply enclose your unix commands in ''. > > i.e. > > #!untested > > 'ls -la' I think you mean ` `, (backticks), right? -- Brett http://www.chapelperilous.net/ --

RE: Unix commands in Perl scripts

2002-02-20 Thread Booher Timothy B 1stLt AFRL/MNAC
Tony, You simply enclose your unix commands in ''. i.e. #!untested 'ls -la' tim Timothy B Booher, Lt USAF Research Engineer AFRL/MNAC 101 W. Eglin Blvd. Eglin AFB, FL 32542-6810 Telephone: 850-882-8302 ext. 3360 Fax: 850-882-2201

Re: How to copy and keep file permissions

2002-02-20 Thread Craig Eberly
Hmm, I've tried this but it doesn't seem to change the file permissions at all on the backup file. I checked into it, and my stat command or $mode in this case is equal to 33261. Is that a normal output for the mode in the stat command? I'm on a Solaris 8 system. Thanks, Craig (Sorry if the

Re: Unix commands in Perl scripts

2002-02-20 Thread William.Ampeh
If I understood your question, you could use "system" or "command ticks". That is: system("cal") //be careful or $a = `cal`; depending on how you want to treat the output. If you want to manipulate the output, use command ticks. __ William Ampeh (x3939) Federal Reser

RE: use unix commands

2002-02-20 Thread Ken Clark
This is easy to manipulate, though as time has went by I've found that perl already can do what i try to do by using system commands. here's a quick example with backticks, though it is not the only way, or correct one dependent on your need. this would require fortune to be in your path ahead of

Re: HTML::TableExtract

2002-02-20 Thread Randal L. Schwartz
> "Kevin" == Kevin Old <[EMAIL PROTECTED]> writes: Kevin> Daniel, Kevin> Try using a switch statement (even though Perl doesn't officially have a Kevin> switch statement). Here's some code below.let me know if you have Kevin> questions. Download and install Switch.pm, and it does. :) -

RE: Unix commands in Perl scripts

2002-02-20 Thread Michael Pastore
Tony, Here's an example calling a .exe not in UNIX though...might help.. @args = ($SysPath."JFMERGE",$MDFPath.$MDFName,$WorkPath.$FName,"-afxon","-axpson","- aitcon","-aii".$INIPath."jfmerge.ini","-all".$INIPath."jfserver.log","-z".$P DFPath.$PDFName); The second argument JFMERGE is a .exe Reg

Sending Mail

2002-02-20 Thread Bhanu Prakash
Hi, I'm new to Perl and am trying to write some cgi programs in Perl. Currently I'm developing a tool in which , when a user submits a form, the input entered by him should be mailed to the address he specifies in one of teh input fileds.! Does anybody have some sample scripts which does so

Re: Grep function inside a for loop does grep the values.

2002-02-20 Thread Jenda Krynicky
Subject:Grep function inside a for loop does grep the values. To: [EMAIL PROTECTED] BCC to: From: [EMAIL PROTECTED] Date sent: Tue, 19 Feb 2002 17:13:00 -0500 > Can somebody help me on what is wrong in the followin

Unix commands in Perl scripts

2002-02-20 Thread Ho, Tony
Hi guys I was wondering if anyone knows how to execute Unix commands in a Perl Script ? I would be most grateful if you could let me know Thanks in advance Tony

[ADMIN REDIRECT] Re: Regular Expressions

2002-02-20 Thread Kevin Meltzer
Hello, I am redirecting this question from beginners-cgi to beginners. Please respond to the original poster ([EMAIL PROTECTED]) and the beginners list. Please remember that non-CGI related questions should not be send to beginners-cgi. Thanks. Cheers, Kevin On Wed, Feb 20, 2002 at 01:13:55PM -

RE: Grep function inside a for loop does NOT grep the values.

2002-02-20 Thread Nikola Janceski
I think Brett McCoy was correct with the trailing newline. try this: chomp($item = $_); just after the foreach (@prv_lst) in place of the line there. You might have to chomp again for the second list. Your array looks like it might have the following in it. @prv_lst = ("N001\n", "N015\n"); le

RE: Grep function inside a for loop does NOT grep the values.

2002-02-20 Thread Satya_Devarakonda
Thanks guys, I am trying to get a count of transactions(in txn_lst) by txn id 557, 255, 243 etc. that were sent to different customers(in prv_lst) N001, N015 etc., from the log txn_log. txn_log A 557 was sent back to N015 at Mon Jan 14 14:48:06 EST 2002 A 255 was sent back to N015 at Mon Jan 1

Fwd: What is the value of @_4_[0], and $return_me? (see below)

2002-02-20 Thread Bruce Ambraal
OOPs! I meant Fwd: What is the value of @_$_[0], and $return_me? (see below) --- Begin Message --- Hi 1. (see subject) 2. Explain lines 3 , 4 3.Why does'nt this coding return anything2 sub routine { my @arr = (0, 'a' 1, 'b'); @_ = @arr; my $retun_me = shift; return( $return_me ) }; -- To

Re: What is the value of @_4_[0], and $return_me? (see below)

2002-02-20 Thread Geoffrey F. Green
On 2/20/02 9:37 AM, "Bruce Ambraal" <[EMAIL PROTECTED]> wrote: > 3.Why does'nt this coding return anything2 Well, for starters, looking at the code below, you assign to $retun_me, but try to return $return_me. See the difference? "retun" vs. "retuRn"? > sub routine { > my @arr = (0, 'a' 1, 'b

Problem With Make on Solaris 8 (Date-Calc-5.0)

2002-02-20 Thread clwong
I received the following error while attempting to install Date-Calc-5.0 on Solaris 8. Date-Calc-4.3 behaves the same way. However, I'm able to do a make successfully of both packages on Solaris 2.5.1. gcc is installed on both platforms. Could you please shed some light on what is causing this err

What is the value of @_4_[0], and $return_me? (see below)

2002-02-20 Thread Bruce Ambraal
Hi 1. (see subject) 2. Explain lines 3 , 4 3.Why does'nt this coding return anything2 sub routine { my @arr = (0, 'a' 1, 'b'); @_ = @arr; my $retun_me = shift; return( $return_me ) }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Win32::ODBC

2002-02-20 Thread Mason, Andrew
I have a table in a database which contains a date field. Being technically inept this filed was specified as of type Char. I would now like correct my error. My idea was to read in the date for each line of the table, then insert this value back into a new field. My code... #! d:/perl/bin/pe

local $/ = undef;

2002-02-20 Thread insomniak
Hi all, Is there a way to find out the current possition in a file when you have unset $/ ? ive used tell but this returns the file size not the possition and $. returns 1 (I think its cos it treats it as one line???) regards Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: HTML::TableExtract

2002-02-20 Thread Andrea Holstein
In article <042101c1b9d4$aa61b560$0701a8c0@KOLD> wrote "Kevin Old" <[EMAIL PROTECTED]>: > ... > foreach $a (@headers){ > > SWITCH: { > > if($a =~ qw/sorry/) { $sorry = 1; last SWITCH; } > if($a =~ qw/kevin/) { $kevin = 1; last SWITCH; } >

Dates Perl & SQL7

2002-02-20 Thread Mason, Andrew
This is a concept question rather than a code question. I have a script which produces a simple report on some simple disk space stats for servers I work with. I thought it would be useful to put this information into a database on a daily basis. This would allow me to then look at historic data

Re: renaming files (versioning)

2002-02-20 Thread Sudarsan Raghavan
Bill Akins wrote: > Hi all, > > After processing files in my perl script, I need to move them to the final > destination. My problem is if the file already exists (lets call it > data.txt), I need to rename it to data-v01.txt (where -v01 is version 01). > > So... if there are four other esisting

RE: problem with getting the noncrypted password from crypted

2002-02-20 Thread Clare Elliott
You can't! Crypt is a one-way function (e.g. you can't derive clear text from hashed text) - you need to crypt the input with the same salt (if you used one) and compare that to the stored password if you wish to validate passwords. Regards Clare > -Original Message- > From: peter