Re: Get file date.

2001-05-04 Thread Gary Stainburn
On Friday 04 May 2001 8:13 am, Julian Church wrote: > At 15:58 03/05/01 -0500, Me wrote: > >Point being, there's a grep (regex based search) > >of the perl doc a few seconds away... > > Thanks for the tip. It's easy to miss information like this when > you're just beginning a new thing like this

Re: DBD::ODBC (say what?)

2001-05-04 Thread Gary Stainburn
Hi Jim, All you should need to do is install the DBI module, and the appropriate DBD module from CPAN. The documentation for these modules is excelent. Although I haven't used your specific setup, I stick to Linux/PostgreSQL I find the setup works great. Gary On Thursday 03 May 2001 7:32

Help needed with perl script......

2001-05-04 Thread n6tadam
Dear List, I have attached a copy of my perl script that I am writing. I am finding that I am having trouble with it. I am sure that there is a simple solution.. To cut a long story short, I have written a bash script, which uses sed and awk to convert the logfile that is generated by the Un

members only area of website

2001-05-04 Thread Sawsan Sarandah
Greetings, I am trying to determine the best method for creating a secure members' only area of a website. The public area of the site displays data retrieved from mysql tables. The private area will allow members to update their own data within those tables. I found plenty of documentation o

Re: Help needed with perl script......

2001-05-04 Thread Me
> but rather than put them into the designated file, > echos them to the screen. Why is this??? print "blah"; prints to stdout, by default the screen. You want: print WTC "blah";

Back slash

2001-05-04 Thread justin todd
Hi This is my connect string. $dbh = DBI->connect("DBI:ODBC:ok","MITSOL\SQLExec"); This is the error message. The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: DBI->connect(ok) failed: [Microsoft][ODBC SQL Server Driver][SQ

Re: Back slash

2001-05-04 Thread Gary Stainburn
Hi Justin, The backslash is used to escape the letter following it, which in your case converts '\S' to a 'S'. To insert a backslash you need to escape it so it keeps it's leteral meening. Try: $dbh = DBI->connect("DBI:ODBC:ok","MITSOL\\SQLExec"); or even this should work $dbh = DBI->connect(

Re: members only area of website

2001-05-04 Thread Gary Stainburn
I'll try to answer your questions one at a time. Firstly, MD5 and the old crypt methods of encryption are both one-way. If you lose your password you cannot get it back. If one of my users lose their passwords, I simply generate a new one for them. Provided your system is totally secure, yo

Using Expect.pm to spawn Dtterm

2001-05-04 Thread Martin McNelis
Hi, This is a follow on from my question yesterday about spawing dtterm and xterm processes for input. As I understand it, it's not possible to do this with pipes as dtterm and xterm handle input differently to most processes. I'm now trying to do the same thing using expect, but hgaving no succ

Static Web Page

2001-05-04 Thread Helio S. Junior
Hello, I would like to know how i can implement OLE automation in my WebPage. Let's say that there is a single button on the Page and after clicking on it, the WebPage will call my Perl Script to do the job. (Be it with Excel, Word, Outlook, etc) Please note that my WebPage has ho FORM tag. It's

Re: Back slash

2001-05-04 Thread Me
> > This is my connect string. > > $dbh = DBI->connect("DBI:ODBC:ok","MITSOL\SQLExec"); > > > > This is the error message. > > Login failed for user 'MITSOLSQLExec'. > > > > As you can see the back slash has been omitted from > > 'MITSOLSQLExec'. I have tried putting two backslashes > > but that d

transfer files problem

2001-05-04 Thread Randall Paulk
The replies to my first email suggest using Net::FTP. But it doesn't work correctly. Below are the warning and error I receive. During installation: WARNING: Prerequisite User failed to load: Can't locate User.pm in @INC ( @INC contains: /u/tbrannon/perl/inetcrossftp/src/lib/site_perl/5.6.0/

Nested Hashes Help

2001-05-04 Thread Craig Moynes/Markham/IBM
Continuing on with my earlier Date formatting program I have run into an 'ugly' issue. I have created a Date formatting hash table like so: ( this is the shortened version) $self->{DF_SPEC} = { a => '(Mon|Tue|Wed|Thu|Fri|Sat|Sun)', A =

Need Fork/Thread Ideas Please

2001-05-04 Thread Chip Cuntz
Hello list, I have got a test automation script that I use to test code running in a Solaris envrionment. The script is written in Perl 5.6.1 and makes system calls via system and open( FD, "the command |"). The script currently runs in serial mode where one function has to wait on the previous

Re: How to recursively tar ?

2001-05-04 Thread Matt Cauthorn
Why isn't the standard tar utility working for you? Try and avoid making things more complicated than they need to be. Once I spend 45 minutes making a perl script only to realize that I could get the same results with a one-liner and pipes on the command line! ~Matt --- [EMAIL PROTECTED] wrote

Re: Nested Hashes Help

2001-05-04 Thread Timothy Kimball
: Now the only way I have figured out how to access it is with this ugly : string: : print "${%{$self{DF_SPEC}}}{'a'}\n"; Try print "$self->{DF_SPEC}{a}\n"; -- tdk

Re: calling a Java class and also its memeber functions from Perl.

2001-05-04 Thread Matt Cauthorn
I'm quickly getting out of my league here, but it sounds like you may want to consider using SOAP::Lite for a remote call like that. I've never used this module, but have perused the docs and it looks very very cool and easy to use. --- Srinivas Samavedam <[EMAIL PROTECTED]> wrote: > Hi, > > M

Re: calling a Java class and also its memeber functions from Perl.

2001-05-04 Thread Casey West
On Fri, May 04, 2001 at 07:49:10AM -0700, Matt Cauthorn wrote: : I'm quickly getting out of my league here, but it sounds like you may want to : consider using SOAP::Lite for a remote call like that. I've never used this module, : but have perused the docs and it looks very very cool and easy to u

Re: Separate DB

2001-05-04 Thread M.W. Koskamp
- Original Message - From: justin todd <[EMAIL PROTECTED]> To: Beginners (E-mail) <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 9:18 AM Subject: Separate DB > Hi all. > > I am running a IIS webserver and a separate MSSQL database. > > Could anyone please tell me what the connection

Need help with forms and files

2001-05-04 Thread Shawn Caldwell
I am trying to append to an existing database and my cgi keeps coming up with an Internal Server Error. I've looked this over many times with different books as references, and I can't see what is wrong with it. My form method is POST. Here is my code: #!/usr/bin/perl require("cgi-lib.pl"); print

Re: Need help with forms and files

2001-05-04 Thread Timothy Kimball
: I am trying to append to an existing database and my cgi keeps coming up : with an Internal Server Error. I've looked this over many times with : different books as references, and I can't see what is wrong with it. My : form method is POST. Here is my code: My money's on you not being able to

Re: Need help with forms and files

2001-05-04 Thread Casey West
On Fri, May 04, 2001 at 12:04:37PM -0400, Timothy Kimball wrote: : : : I am trying to append to an existing database and my cgi keeps coming up : : with an Internal Server Error. I've looked this over many times with : : different books as references, and I can't see what is wrong with it. My : :

Re: Need Fork/Thread Ideas Please

2001-05-04 Thread Dan Brown
If you could find a copy of "Perl Cookbook" (Pub: O'Reilly, Authors: Tom Christiansen & Nathan Torkington, ISBN: 1-56592-243-3) look at recipes 17.11 Forking Servers 17.12 Pre-Forking Servers 17.13 Non-Forking Servers Ahh, I found these two links that show the same code a

appending unique entries to a text file in perl

2001-05-04 Thread Jason Cruces
Hello, I'm pretty new to Perl and I am running into a problem that I think should be pretty easy to fix but I cannot get the syntax right. I am trying to write a script that will: 1. Open two files, one to be read from (call it file1) and another to be written to (file2) 2. Both files will contai

Re: appending unique entries to a text file in perl

2001-05-04 Thread M.W. Koskamp
> Here is what I have so far: > > open (FILE, ">>file2") || die "cannot open file2\n"; > open (OIDFILE, "file1") || die "cannot open file1\n"; > while () { > $new_oid = $_; > while () { You opened FILE for output here. besides this is not too efficient, because you read the whole file2 over and o

Re: Need Fork/Thread Ideas Please

2001-05-04 Thread Paul
--- Chip Cuntz <[EMAIL PROTECTED]> wrote: > . . . > boxes in the network to do things. Since these functions are > essentially running on "other processors" I would like to > spawn/fork/thread two of them and wait for both there completion. > . . . > What I am looking for is code snippets, an e

Re: appending unique entries to a text file in perl

2001-05-04 Thread Jeff Pinyan
On May 4, Jason Cruces said: >1. Open two files, one to be read from (call it file1) >and another to be written to (file2) Ok, you've got this down fine. >2. Both files will contain a list of entries (some >will be duplicates). If file1 contains an entry that >is not in file2, append it to file

RE: appending unique entries to a text file in perl

2001-05-04 Thread Wagner-David
Use a hash and read in file2 first: open (FILE, "$file2") || die "cannot open $file2:$!"; while ( ) { if ( ! defined $HashExist{$_} ) { $HashExist{$_} = 1; } } close(FILE); Now reopen as you have. Now read your OIDFILE while () { chomp; next if ( defined $HashEx

Hash help

2001-05-04 Thread Craig Moynes/Markham/IBM
First sorry for asking this, I only keep select emails from this list and couldn't find an answer among them. I declare my hash like this: my ( %FS_XCPTN ); # hash table, key is mount point, # value is FS's special case H_LIMIT and C_LIMIT I use it

Re: Hash help

2001-05-04 Thread Jos I Boumans
In the 2nd case your addressing your hash as a hash REFERENCE, which makes a big difference i suggest you read up on references at http://language.perl.com/newdocs/pod/perlreftut.html either way, your first method works fine and should work in most cases. however, if you want to pass said hash t

Re: Hash help

2001-05-04 Thread Timothy Kimball
: I declare my hash like this: : : my ( %FS_XCPTN ); # hash table, key is mount point, : # value is FS's special case H_LIMIT and : C_LIMIT : : I use it like this: : $FS_XCPTN{$mntPoint} = { :

filehandle question

2001-05-04 Thread Chris Rutledge
is it possible to open a filehandle on a file change one line in that file without outputing to another file.

Environment variable question

2001-05-04 Thread Hitesh Ray
> Hi All, I am required to modify an Environment variable from one value to another using perl script. I can access the env. variables in the perl script using ENV. How can i modify so that when I exit my perl script -- the env. variable has new value. Thanks in advance. Regards, Hitesh

Re: filehandle question

2001-05-04 Thread Timothy Kimball
: is it possible to open a filehandle on a file change one line in that file : without outputing to another file. You can open the file, seek() to a particular position in it, and start overwriting the file at that position, but when you reach the end of that line, you'll keep on writing past it

Re: Environment variable question

2001-05-04 Thread Timothy Kimball
: I am required to modify an Environment variable from one value to another : using perl script. I can access the env. variables in the perl : script using ENV. How can i modify so that when I exit my perl script -- the : env. variable has new value. You can't. Perl scripts are child processes o

Re: Separate DB

2001-05-04 Thread Kenny Gatdula
from perldoc DBD::ODBC Example (using MSSQL Server): my $DSN = 'driver={SQLServer};Server=server_name; database=database_name;uid=user;pwd=password;'; my $dbh =DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n"; At 09:18 AM 5/4/2001 +0200, justin todd wrote: >Hi all. > >I am running a IIS web

Re: Environment variable question

2001-05-04 Thread Michael Lamertz
Hitesh Ray ([EMAIL PROTECTED]) wrote: > > > > Hi All, > > I am required to modify an Environment variable from one value to another > using perl script. I can access the env. variables in the perl > script using ENV. How can i modify so that when I exit my perl script -- the > env. variable has

Skipped lines

2001-05-04 Thread Ed Keer
Here's a very beginner question. I am working through the learning perl for win32 book and find that when I use to out info into an array, the program ignores the following print line. For example, given the folliwng lines in the program: >@list = ; >print "I will now print your list in revers

Re: Skipped lines

2001-05-04 Thread Dan Brown
Is that all of your code? I tried it with Perl C:\WINNT\PROFILES\dan>perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-object on NT (I don't have an ME machine around to try

Re: Skipped lines

2001-05-04 Thread Brett W. McCoy
On Fri, 4 May 2001, Ed Keer wrote: > Here's a very beginner question. I am working through > the learning perl for win32 book and find that when I > use to out info into an array, the program > ignores the following print line. For example, given > the folliwng lines in the program: > > >@list

Re: Skipped lines

2001-05-04 Thread Brett W. McCoy
On Fri, 4 May 2001, Dan Brown wrote: > Note that when running the script the text "" isn't printed > until the script exists. It's printed the input prompt that appears > after the script exist. I added it to make it clear what was entered > where. > > If the code you include below is not all o

Re: Skipped lines

2001-05-04 Thread Steve Neu
I was thinking CTRL-C would exit the program prematurely without printing anything but I didn't try it, so I am probably wrong.

Re: Skipped lines

2001-05-04 Thread Brett W. McCoy
On Fri, 4 May 2001, Steve Neu wrote: > I was thinking CTRL-C would exit the program prematurely without printing > anything but I didn't try it, so I am probably wrong. Theoretically, it should terminate the program. On Win2K, when you ^C certain command-line apps, you get this message: Th

Re: Environment variable question

2001-05-04 Thread Paul
--- Hitesh Ray <[EMAIL PROTECTED]> wrote: > I am required to modify an Environment variable from one value to > another using perl script. I can access the env. variables in the perl > script using ENV. How can i modify so that when I exit my perl script > -- the env. variable has new value. Tha

Re: Skipped lines

2001-05-04 Thread Paul
--- Steve Neu <[EMAIL PROTECTED]> wrote: > I was thinking CTRL-C would exit the program prematurely without > printing anything but I didn't try it, so I am probably wrong. Just at a guess, I'd say it depends on the OS. On UNIX, I'd bet you're right.

Re: Environment variable question

2001-05-04 Thread Hitesh Ray
Hi, I am atuomating our testing infrastructure using "Testify". The scenario is: Testify calls a script that builds and creates the necessary dir. structure useful to testify. During that process it is suppose to change the directory name. I am trying to get the perl script return the new directo

Re: Environment variable question

2001-05-04 Thread Me
> I am trying to get [one program to pass some > info to another] There's many ways to skin that cat! (Apologies to my four cats). I suggest creating a file which contains the directory name.

Re: Skipped lines

2001-05-04 Thread Ed Keer
This is happening on a number of programs I wrote. Oddly enough the one I mentioned in my last post works fine now. Here is code copied directly from the book: print "Enter the line number: "; chomp($a = ); print "Enter the lines , end with ^Z:\n"; @b = ; print "Answer: $b[$a-1]"; It is sitll

Counting lines on a file

2001-05-04 Thread Susan Richter
Can someone tell me what command I can use to go to machines and count the lines on a certain file? I have log files for every machines (20 all together). Each log file has lines that would equate to the files that it found. I need to know how many files are found on all the machines. I am

Re: Counting lines on a file

2001-05-04 Thread Jeff Pinyan
On May 4, Susan Richter said: >Can someone tell me what command I can use to go to machines and count the >lines on a certain file? I have log files for every machines (20 all >together). Each log file has lines that would equate to the files that it >found. I need to know how many files ar

Re: Counting lines on a file

2001-05-04 Thread Brett W. McCoy
On Fri, 4 May 2001, Susan Richter wrote: > Can someone tell me what command I can use to go to machines and count the > lines on a certain file? I have log files for every machines (20 all > together). Each log file has lines that would equate to the files that it > found. I need to know how m

Re: Counting lines on a file

2001-05-04 Thread Me
> >Can someone tell me what command I > >can use to go to machines and count the > >lines on a certain file? perl -ne '/\n/ and $i++; eof and print $i' where isn't really in <>s. (Btw, be wary of using eof(). Otoh, sometimes it's just what you want.)

Re: Counting lines on a file

2001-05-04 Thread Mike Lacey
my $file = $ARGV(0); hmmm -- try my $file = shift; - Original Message - From: "Brett W. McCoy" <[EMAIL PROTECTED]> To: "Susan Richter" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 1:26 AM Subject: Re: Counting lines on a file > On Fri, 4 May 2001, Susan Ric

Re: Counting lines on a file

2001-05-04 Thread Brett W. McCoy
On Sat, 5 May 2001, Mike Lacey wrote: > my $file = $ARGV(0); Oops, that should be $ARGV[0]; -- Brett http://www.chapelperilous.net/btfwk/ Men often believe -- or pretend -- that the "Law"

Re: Counting lines on a file

2001-05-04 Thread Jeff Pinyan
On May 4, Brett W. McCoy said: >On Fri, 4 May 2001, Susan Richter wrote: > >> Can someone tell me what command I can use to go to machines and count the >> lines on a certain file? I have log files for every machines (20 all >> together). Each log file has lines that would equate to the files t

Re: Skipped lines

2001-05-04 Thread David Monarres
On Fri, 04 May 2001 13:29:06 Steve Neu wrote: > I was thinking CTRL-C would exit the program prematurely without printing > anything but I didn't try it, so I am probably wrong. > > I thought that CTRL-Z was the key combo in the Windows world. (but for 2000 I do not know) David Monarres <[EM