Calling a Method...

2001-08-08 Thread Kevin der Kinderen
I hope I'm explaining this right. I am including a package: use Net::Telnet::Cisco that includes another package Net::Telnet How do I call a method from Net::Telnet? Do I have the "use" it explicitly? When I try something like: $x = Net::Telnet::Cisco->new( Host => $_[0] ); $fh

Is there an easy way to reject certain types of input?

2001-08-08 Thread Barry Carroll
Hi All, I have the subroutine as follows, if I type any number other than 0 thru 7 it's fine, but if i give a string or a char as an input it of course will not function correctly. What can I put in the first if statement to reject characters, I was thinking about an unless statement, but I don

RE: Calling a Method...

2001-08-08 Thread Robin Lavallee (LMC)
> I hope I'm explaining this right. I am including a package: > use Net::Telnet::Cisco > > that includes another package > Net::Telnet > > How do I call a method from Net::Telnet? Do I have the "use" it > explicitly? > > When I try something like: > $x = Net::Telnet::Cisco->new( H

RE: Hashes with multiple values per key

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Casey West [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 07, 2001 5:23 PM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: Re: Hashes with multiple values per key > > ... > That's not very nice dude. I don't get the impression this is > homework

RE: DBI Perl and rows...

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 07, 2001 7:58 PM > To: Beginners (E-mail) > Subject: DBI Perl and rows... > > > List, > > I have the following code here > > my $sth = $dbh ->prepare( qq{ SELECT * FROM >

Re: very funny...

2001-08-08 Thread Jim Conner
At 06:30 PM 08.07.2001 +, Mel Matsuoka wrote: >At 09:08 AM 08/08/2001 +0530, Karthik Krishnamurthy wrote: > >All of the experts you are talking about started > >out some time as clueless newbies too. They didn't > >become experts by asking questions, the answers to > >which they could find the

Re: Is there an easy way to reject certain types of input?

2001-08-08 Thread Mel Matsuoka
At 11:09 AM 08/08/2001 +0100, Barry Carroll wrote: >Hi All, > >I have the subroutine as follows, if I type any number other than 0 thru 7 >it's fine, >but if i give a string or a char as an input it of course will not function >correctly. > >What can I put in the first if statement to reject char

Re: Is there an easy way to reject certain types of input?

2001-08-08 Thread Mel Matsuoka
At 02:52 AM 08/08/2001, Mel Matsuoka wrote: > >You should optimize this code by using a dispatch table, which is basically >a hash which maps keys to references to subroutines: > > %menuChoices = ( '0' => \&readFile, > '1' => \&displayFile, > ...

Re: using system?

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, insomniak wrote: > Basically im writting a script that runs a series of commands using > system(). But I need to know that the previous command has completed before > running the next. I had thought that using "wait" might do the trick but I > do not have any examples to go fr

RE: using system?

2001-08-08 Thread Bob Showalter
> -Original Message- > From: insomniak [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 9:26 AM > To: [EMAIL PROTECTED] > Subject: Re: using system? > > > Hi all, > Thanks for your reply, but I think i should rephase what I am > trying to do. > > Basically im writting a sc

RE: list archives

2001-08-08 Thread Mooney Christophe-CMOONEY1
I apologize. You're right. There are newer dates at the bottom. thanks! christopher -Original Message- From: Elaine -HFB- Ashton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 5:51 PM To: Mooney Christophe-CMOONEY1 Cc: [EMAIL PROTECTED] Subject: Re: list archives Mooney Ch

Re: split problem

2001-08-08 Thread Narendran Kumaraguru Nathan
Hi Romek, Try with \s*=\s* Naren. Romek KrisztiƔn wrote: > Hello! > > What's the problem with my split? > > $line = "var=value"; > ($var, $value) = split(/\s*[=]\s*/, $line); > > Krisztian > > I experienced that $var and $value contained the first letter of the var and > the value. Som

Formatting

2001-08-08 Thread Najamuddin, Junaid
Hi, all I need some help please I have a code to format some text The problem is that it is not doing exactly what I want sample of file is enclosed the out.txt is the input file which is being read by the code The script chops the first 21 lines after running thru the script it looks like outto

RE: Formatting

2001-08-08 Thread Wagner-David
If you know that there will be something like 7 rows returned. srvrmgr:s1_nxlkdev5> Then you could do something like: while () { chomp; last if ( /^\d+\s+rows\s+returned\.$/ ); # if this can be an error or something else

Re: does foreach choose in order?

2001-08-08 Thread Brent Michalski
Yes, for and foreach will select the elements of the array starting at 0 and ending at the last element. It is the %hash that you are thinking of that does not read data in the order in which they were put into it... HTH, Brent

Re: does foreach choose in order?

2001-08-08 Thread Paul Johnson
On Wed, Aug 08, 2001 at 10:46:29AM -0500, Mooney Christophe-CMOONEY1 wrote: > I need to read elements from @blah from "left-to-right" (ie. in the > order that successive shifts would read them). I seem to remember > reading somewhere that one should use 'for' only when s/he doesn't > care about

Loading file into hash

2001-08-08 Thread James Ferree
Hi, I am looking for a way to load a file containing the following example data into a hash #From TO Jim James Art Arthur JohnArthur Then when $a=Jim I would like to convert it to $a=James. Can this be done? Jim __ Do You Yahoo!?

Re: a little help here please

2001-08-08 Thread Casey West
On Wed, Aug 08, 2001 at 04:43:00PM +0100, Barry Carroll wrote: : Hi, : : Perl has a sleep function: sleep(EXPR) : where EXPR is the time in minutes to : make the script sleep for. Woops, I think you meant that EXPR is the number of seconds to sleep(). sleep( 5 * 60 ); # sleep for 5 minutes

Re: Loading file into hash

2001-08-08 Thread Casey West
On Wed, Aug 08, 2001 at 08:56:59AM -0700, James Ferree wrote: : Hi, : : I am looking for a way to load a file containing the : following example data into a hash : : #From TO : Jim James : Art Arthur : JohnArthur : : Then when $a=Jim I would like to convert it to : $a=James. : :

RE: Loading file into hash

2001-08-08 Thread Mooney Christophe-CMOONEY1
Quite easily: open(IN,$file) || die "could not open $file: $!\n"; while () { s:#.*$::; # weed out comments next unless /\S/; # make sure there's something to input ($from,$to)=split /\s+/; # split the line by the whitespace $hash{$from}=

DBI for Access

2001-08-08 Thread E. Alan Hogue
Hello, I notice there's been some talk about DBI lately. My appologies if this duplicates anything covered lately. I need to hook up to an Access database running, of course, on a win32 system. I am completely new to DBI. I found a DBD on CPAN for ODBC, but the documentation attached to it only

RE: a little help here please

2001-08-08 Thread Dave Newton
I'm continually surprised by the information-free subject headers. Most people that start a new thread here need help; that's why they're here. Not flaming, just hoping that people will take into account the potential usefulness of subject lines (i.e., "Oooo, I know how to do that!" or "Oooo, I ne

modules

2001-08-08 Thread Joe Bellifont
How do I know what modules are installed ? Does the CGI_Lite module come bundled by default? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: modules

2001-08-08 Thread Scott
Here is some code that will list all installed modules #!/usr/bin/perl -w use ExtUtils::Installed; my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || "???"; print "$module -- $version\n"; } -Original Mess

RE: a little help here please

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 11:44 AM > To: Beginners (E-mail) > Subject: a little help here please > > > I have a script that does a bunch of things, one of which > parses a large > amount of log files > eve

heredoc

2001-08-08 Thread Ron Woodall
Hi All: How do I take a heredoc section and write it to an array? Any suggestions? Ron Woodall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: heredoc

2001-08-08 Thread Mooney Christophe-CMOONEY1
This seems to work: @array=split /\n/,

Re: DBI for Access

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, E. Alan Hogue wrote: > I notice there's been some talk about DBI lately. My > appologies if this duplicates anything covered lately. > > I need to hook up to an Access database running, of > course, on a win32 system. I am completely new to DBI. > > I found a DBD on CPAN for O

Re: does foreach choose in order?

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, Mooney Christophe-CMOONEY1 wrote: > I need to read elements from @blah from "left-to-right" (ie. in the > order that successive shifts would read them). I seem to remember > reading somewhere that one should use 'for' only when s/he doesn't > care about the order in which the

How can I "sleep" and hundreds milliseconds, shorter than 1 second?

2001-08-08 Thread EriK W
How can I "sleep" and hundreds million seconds, shorter than 1 second? I want to have a short sleep which should be shorter than 1 second, it would be ideal if it can sleep for a radom short time between , say.. 300-800 milliseconds? Thank you! -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: heredoc

2001-08-08 Thread Troy Denkinger
On Wednesday 08 August 2001 13:40, Ron Woodall wrote: > How do I take a heredoc section and write it to an array? Any suggestions? Hmmm, at the risk of not being helpful, can you explain what it is you're wanting to do? If you're wanting to save strings to an array and then iterate over t

Re: How can I "sleep" and hundreds milliseconds, shorter than 1 second?

2001-08-08 Thread Craig Moynes/Markham/IBM
perldoc -f select $timeToSleep=0.3; select(undef, undef, undef, $timeToSleep); - Craig Moynes Internship Student netCC Development IBM Global Services, Canada Tel: (905) 316-3486 [EMAIL PROTECTED]

Graphs in perl ....

2001-08-08 Thread Elie De Brauwer
I'm looking for a modules that can create graphs, i want a nice picture that says you loads are today here, yesterday there the day before there so i can see any evolutions, the same for diskspace and stuff. So what i want to know is there a module / docs about this ? And how can i search

Re: How can I "sleep" and hundreds milliseconds, shorter than 1 second?

2001-08-08 Thread Karthik Krishnamurthy
check the perl manpage for select. /kk On Wed, Aug 08, 2001 at 11:03:40AM -0700, EriK W wrote: > How can I "sleep" and hundreds million seconds, shorter than 1 second? > > I want to have a short sleep which should be shorter than 1 second, it would > be ideal if it can sleep for a radom short t

Re: Graphs in perl ....

2001-08-08 Thread MPM
The module you are probably looing for is GD::Graph. The pod that comes with it contains enough info to get you started with it. Have you looked into MRTG though? It does what your looking for with snmp and then assembles averages multiple graphs get generated with lesser and lesser detail. If

Re: Compare large files memory error

2001-08-08 Thread Will Crain
Perhaps the DOS FC (file compare) command will suffice for your application: Compares two files or sets of files and displays the differences between them FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/U] [/W] [/] [drive1:] [path1]filename1 [drive2:][path2]filename2 FC /B [drive1:][path1]filename1 [

Re: heredoc

2001-08-08 Thread Ron Woodall
Hi Troy: Thanks for the reply. At 01:11 PM 8/8/01 -0400, you wrote: >On Wednesday 08 August 2001 13:40, Ron Woodall wrote: > > How do I take a heredoc section and write it to an array? Any > suggestions? > >Hmmm, at the risk of not being helpful, can you explain what it is you're

Deleting leading/trailing whitespace

2001-08-08 Thread Sophia Corwell
Is there a way to delete leading/trailing whitespace in one fly? I have the following: $temp =~ s/^\s+//; # Removing leading spaces $temp =~ s/\s+$//; # Removing trailing spaces Is there a way to combine these two statements into one? Thanks in advance, __

Re: Deleting leading/trailing whitespace

2001-08-08 Thread John Way
try this... $string = " text "; print "Before regex:\"$string\""; $string =~ s/^\s+|\s+$//g; print "After regex:\"$string\""; (the "|" indicates an OR) John Way Confidentiality Notice: *** Privileged/Confidential information may be contained

RE: Frustrated installing modules!?!

2001-08-08 Thread John Way
Still no dice! I keep getting errors: C:\Perl>ppm PPM interactive shell (2.1.5) - type 'help' for available commands. PPM> set Commands will be confirmed. Temporary files will be deleted. Download status will be updated every 16384 bytes. Case-insensitive searches will be performed. Package inst

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Sudarsan Raghavan
($temp) = $temp =~ m/^\s+(\S*)\s+$/; regards, Sudarsan Sophia Corwell wrote: > Is there a way to delete leading/trailing whitespace > in one fly? > > I have the following: > > $temp =~ s/^\s+//; # Removing leading spaces > $temp =~ s/\s+$//; # Removing trailing spaces > > Is there a way to com

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Michael Fowler
On Wed, Aug 08, 2001 at 11:55:42AM -0700, Sophia Corwell wrote: > $temp =~ s/^\s+//; # Removing leading spaces > $temp =~ s/\s+$//; # Removing trailing spaces > > Is there a way to combine these two statements into one? There is, as has been mentioned by John Way. However, unless you have some

RE: Deleting leading/trailing whitespace

2001-08-08 Thread Mooney Christophe-CMOONEY1
> From: Sudarsan Raghavan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 1:48 PM > To: Sophia Corwell > Cc: [EMAIL PROTECTED] > Subject: Re: Deleting leading/trailing whitespace > > > ($temp) = $temp =~ m/^\s+(\S*)\s+$/; No, because this won't match the following string: $

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Adam Turoff
On Wed, Aug 08, 2001 at 02:24:39PM -0500, Mooney Christophe-CMOONEY1 wrote: > > From: Sudarsan Raghavan [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 08, 2001 1:48 PM > > To: Sophia Corwell > > Cc: [EMAIL PROTECTED] > > Subject: Re: Deleting leading/trailing whitespace > > > > > > ($temp)

RE: Deleting leading/trailing whitespace

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Sophia Corwell [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 2:56 PM > To: [EMAIL PROTECTED] > Subject: Deleting leading/trailing whitespace > > > Is there a way to delete leading/trailing whitespace > in one fly? > > I have the following: >

Re: Graphs in perl ....

2001-08-08 Thread Mel Matsuoka
At 08:16 PM 08/08/2001 +0200, Elie De Brauwer wrote: >So what i want to >know is there a module / docs about this ? And how can i search these modules >by myself so i don't need to bother this list each time i need a module ;)) http://search.cpan.org should be everyones first stop before askin

NIS, NIS+, or Standalone

2001-08-08 Thread Baartmans, Hans
I am trying to write a little script to determine is a UNIX system is using NIS, NIS+, or a standalone system. Any suggestions on how to approach this? Thanks in advance! Hans

using a window while process is running in pTk

2001-08-08 Thread Thomas_P_Murnane
I created a program in ptk that basically takes a file in, splits it up and runs a process on each file, these can be run simultaneously or on after another. I'm using system( ) to kick off each process. The problem is that once I RUN this, I can't use the window until the processing is complete!!

RE: Frustrated installing modules!?!

2001-08-08 Thread Dave Newton
> Still no dice! I keep getting errors: > > C:\Perl>ppm > PPM interactive shell (2.1.5) - type 'help' for available commands. > PPM> set > Commands will be confirmed. > Temporary files will be deleted. > Download status will be updated every 16384 bytes. > Case-insensitive searches will be perform

Re: Loading file into hash

2001-08-08 Thread James Ferree
--- James Ferree <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking for a way to load a file containing the > following example data into a hash > > #From TO > Jim James > Art Arthur > JohnArthur > > Then when $a=Jim I would like to convert it to > $a=James. > > Can this be done?

RE: using a window while process is running in pTk

2001-08-08 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 4:03 PM > To: [EMAIL PROTECTED] > Subject: using a window while process is running in pTk > > > I created a program in ptk that basically takes a file in, > splits it up and >

RE: Loading file into hash

2001-08-08 Thread Bob Showalter
> -Original Message- > From: James Ferree [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 4:42 PM > To: James Ferree; [EMAIL PROTECTED] > Subject: Re: Loading file into hash > > > > --- James Ferree <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am looking for a way to load

Re: How can I "sleep" and hundreds milliseconds, shorter than 1 second?

2001-08-08 Thread Evgeny Goldin
Time::HiRes is also good. It may be used for measuring time in msec -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Hit counters

2001-08-08 Thread Matthew Peter Lyon
this is a virus. don't open it. - Original Message - From: "Sharon Carter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 1:58 PM Subject: Hit counters Hi! How are you? I send you this file in order to have your advice See you later. Thanks -- To un

RE: Hit counters

2001-08-08 Thread Mooney Christophe-CMOONEY1
this explains a lot. only in Windows ... ;) -Original Message- From: Matthew Peter Lyon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:34 PM To: Sharon Carter; [EMAIL PROTECTED] Subject: Re: Hit counters this is a virus. don't open it. - Original Message - From:

RE virus...I got it too...!

2001-08-08 Thread Mark Normand
Thank God for UNIX and Linux...! Mark Normand IT Support Specialist 16 West Kenneth St. Lawrence, MA 01843 Tel: 978-975-0588 Mobile: 978-590-3143 Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: beginners Digest 8 Aug 2001 19:36:47 -0000 Issue 302

2001-08-08 Thread Richard J. Barbalace
> From: "Scott" <[EMAIL PROTECTED]> > To: "Joe Bellifont" <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > Subject: RE: modules > Date: Wed, 8 Aug 2001 10:29:05 -0700 > > Here is some code that will list all installed modules > > #!/usr/bin/perl -w > use ExtUtils::Installed; > my $instmod = Ex

RE: Hit counters

2001-08-08 Thread Peter Scott
At 04:39 PM 8/8/01 -0500, Mooney Christophe-CMOONEY1 wrote: >this explains a lot. > >only in Windows ... ;) It's the Sircam virus. I've received variants of this message 10-20 times a day for the last 5 days. The person who sent it wouldn't have known it was being sent to begin with and proba

Creating a hash

2001-08-08 Thread Sofia
I have the following hash of first names and last names: %hash = ( joe => "smith", jim => "jones", sof => "comes", ); If for example, jim now has two last names ie jones taylor, how do I represent that on the hash? Thanks in advance again, _

Re: Creating a hash

2001-08-08 Thread Mel Matsuoka
At 03:15 PM 08/08/2001 -0700, Sofia wrote: >I have the following hash of first names and last >names: > >%hash = ( > joe => "smith", > jim => "jones", > sof => "comes", >); > >If for example, jim now has two last names ie jones >taylor, how do I represent that on the hash? You'd basically w

Perl:fileX.pl-->report.shtml

2001-08-08 Thread Thomas Burkhardt
Perl Gurus: Greetings! 1) What bare bones code do I need in my perl/cgi script to produce an HTML page? I want to run this script merely to produce a page. Eventually, I will be querying a dB and producing links, but what are the basics? My serveral basic books on Perl and CGI do not seem

PERL_LIB Questions

2001-08-08 Thread Michael Workman
Hello everyone, I have a Perl module that is trying to use the DynaLoader module. I have installed this Module in my home directory on a Digital Unix system. This is because I do not have root privelege and cannot install these modules in the proper system folder for perl modules. I am having p

hashes to remap values

2001-08-08 Thread James Ferree
Hi, I have some value I want to remap stored in a tab seperated file For example #FROMTO Jim James Bob Robert I would like to load the file into a hash and then everytime I see $a=Jim I would like to set $a=James. Can I do this with a hash? It think it would be a lot faster than

After I load Perl

2001-08-08 Thread Kent Mercer
How do I begin my first script? And how do I save it ? Something simple like "Hello World" Just started 2 days ago Need pointed in the right direction Thanks Kent

Re: Can I post through a regular newsreader?

2001-08-08 Thread Jack Williams
Why yes you can! I'm posting this from Outlook Express and heck if OE can do it, anything can. :) the News Server is: nntp.perl.org Once you download the (pleasantly short) list of newsgroups, you'll see perl.beginners in there. Yes! I answered a question! And I may even be right! Now if

DBI on Darwin/PowerPC ?

2001-08-08 Thread Agustin Bialet
Hi, Is anyone using DBI on Darwin/PowerPC ? Thanks, Agustin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

WWW-Authenticate

2001-08-08 Thread Michael Leigh
All, I am trying to write a program, which log's on to a password protected web page and runs a report. Using a network sniffer I monitored the packets when I clicked onto this web page. Via the sniffer I see when I click on the link I see access-denied and get redir to do a WWW-authenticate. Has

Re: Perl:fileX.pl-->report.shtml

2001-08-08 Thread Peter Scott
At 04:21 PM 8/8/01 -0600, Thomas Burkhardt wrote: >Perl Gurus: You might want the gurus on [EMAIL PROTECTED] Suggest you follow up there. >Greetings! > >1) What bare bones code do I need in my perl/cgi script to produce an >HTML page? I want to run this script merely to produce a page. >Event

Re: After I load Perl

2001-08-08 Thread Peter Scott
>How do I begin my first script? > >And how do I save it ? > >Something simple like "Hello World" > >Just started 2 days ago >Need pointed in the right direction What platform are you on? Windows, Mac, Unix, VMS, Palm...? -- Peter Scott Pacific Systems Design Technologies http://www.perldebugg

Re: After I load Perl

2001-08-08 Thread Mel Matsuoka
At 08:29 AM 08/08/2001 -0600, Kent Mercer wrote: >How do I begin my first script? > >And how do I save it ? > >Something simple like "Hello World" > >Just started 2 days ago >Need pointed in the right direction Check out the resources and FAQs located at http://www.perl.com Theres a plethora o

RE: PERL_LIB Questions

2001-08-08 Thread Matt Crapo
I have not figured out how to change the perl library path in my environment. Would love to know how if anybody can advise. I have, however, figured out how to include it in a script. A script will process any "use" or "require" statements first, so in order to change something that affects tho

how to run Perl code in my own pc computer but not on server?

2001-08-08 Thread Kehai Li
how to run Perl code in my own pc computer but not on server?

Re: Creating a hash

2001-08-08 Thread Michael Fowler
On Wed, Aug 08, 2001 at 12:20:35PM +, Mel Matsuoka wrote: > %hash = ( >joe => "smith", >jim => ["jones", "taylor"], >sof => "comes", > ); This data structure would require extra checks of the values (i.e. ref($hash{'joe'}) eq 'ARRAY' ? $hash{'joe'}[0] : $hash{'joe'}) each time you

RE: how to run Perl code in my own pc computer but not on server?

2001-08-08 Thread Bedford, Donald T.
I've had very good luck with ActivePerl. http://aspn.activestate.com/ASPN/Downloads/ActivePerl/ When installed, the executable needs to be in your PATH. Then you can run it with "perl yourstript.pl" or whatever... Be sure to read the FAQ first. -don -Original Message- From: Kehai Li [m

Re: NIS, NIS+, or Standalone

2001-08-08 Thread Elaine -HFB- Ashton
Baartmans, Hans [[EMAIL PROTECTED]] quoth: *>I am trying to write a little script to determine is a UNIX system is using *>NIS, NIS+, or a standalone system. Any suggestions on how to approach this? NIS has a few defining features like /etc/defaultdomain and /var/yp/* NIS+ is almost never used a

Re: Hit counters

2001-08-08 Thread Mike Rodgers
My ISP detected the virus and deleted the message. They sent me a note to let me know. Mike Peter Scott wrote: > > At 04:39 PM 8/8/01 -0500, Mooney Christophe-CMOONEY1 wrote: > >this explains a lot. > > > >only in Windows ... ;) > > It's the Sircam virus. I've received variants of this messag

Re: modules

2001-08-08 Thread Kevin der Kinderen
Cool script. Why does a bunch list with a version of -- ??? Perl -- 5.6.1 Pod -- ??? RAS::AS5200 -- 1.04 SHA -- 2.01 Term::ANSIColor -- 1.04 Pod for example above. Tks, K Scott wrote: > Here is some code that will list all installed modules > > #!/usr/bin/perl -w > use ExtUtils::Installed; >

RE: Loading file into hash

2001-08-08 Thread James Ferree
Thanks for your help, this is what the final code looks like. sub load_keys_file { open(KEY,$keys_file) || die "could not open $file: $!\n"; while () { next unless (/^\S/ && !/^#/); # make sure there's something to input and line does not start wit

Re: Hit counters

2001-08-08 Thread Michael Kelly
On 8/8/01 1:58 PM, Sharon Carter wrote: > Hi! How are you? Hi! We are fine! > I send you this file in order to have your advice As a wise man once said... "[S]he who sendeth viruses to a perl group shall get no advice." > See you later. Thanks The pleasure's all mine! -Michael Kelly Email:

How can I know the path to exectue perl

2001-08-08 Thread Li Kehai
I mean, how to decide the first line. #!/usr/local/bin/perl or #!/usr/bin/perl Thanks in advance!

RE: PERL_LIB Questions

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, Matt Crapo wrote: > I have not figured out how to change the perl library path in my > environment. Would love to know how if anybody can advise. I have, > however, figured out how to include it in a script. PERL5LIB=$PERL5LIB:/path/to/module export PERL5LIB (assuming you

Re: How can I know the path to exectue perl

2001-08-08 Thread Brett W. McCoy
On Wed, 8 Aug 2001, Li Kehai wrote: > I mean, how to decide the first line. > > #!/usr/local/bin/perl > > or #!/usr/bin/perl Assuming you are on something resembling Unix, try this at the command-line: which perl This will tell you the full path to your Perl executable and will be what goes af

Re: How can I know the path to exectue perl

2001-08-08 Thread Chris Garaffa
Try whereis perl On Wednesday, August 8, 2001, at 09:04 PM, Li Kehai wrote: > I mean, how to decide the first line. > > #!/usr/local/bin/perl > > or #!/usr/bin/perl > > Thanks in advance! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Calling a Method...

2001-08-08 Thread Kevin der Kinderen
Doh! Thanks Robin. K "Robin Lavallee (LMC)" wrote: > > You have a syntax error, since you have not added a '$' in front of > x, > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

A little off topic.

2001-08-08 Thread Michael Carmody
Having crafted my masterpiece in perl, I now need to get it to run from within a VB script. (VB takes office file, converts to .csv, which perl scripts then parses, but poor secretary has to have excel doco to work on) So this is only in the interest of allowing perl to actually be used at

RE: DBI for Access

2001-08-08 Thread Steve Howard
The docs for DBD::ODBC give examples of how to make connections. perdoc DBI gives a lot of good examples of how to use DBI, and diagrams out the place of DBI and DBD in the application. That's probably enough to get you started with it. As for whether it can be used with Win 2K and Access, yes.

Re: A little off topic.

2001-08-08 Thread Rex Arul
Please visit http://www.activestate.com . They have PerlApp and PerlCOM tools as part of the Perl Development Kit. With PerlApp you can generate free running EXEs and with PerlCOM you can create DLLs which can be invoked by any VB/VBScript/JScript code. - Original Message - From: "Mich

string into an array

2001-08-08 Thread Tyler Longren
Hello everyone, I'm grepping a file for a short string (dns3): my $command = "cat $file | grep -i dns3"; my $exec = `$command`; This will give me many lines for a result. If I did a print "$exec"; all of the data would be printed at once. How Do I get the results from the grep and place them i

Re: a little help here please

2001-08-08 Thread .
You could try something like this (pseudocode): done=false; while(!done){ $start_time=time(); $time=time(); while($time < $start_time + (5*60*60)){ # Note: the 5 minute calculation is based on the tickcount # method used by older versions of other languages # I

Re: a little help here please

2001-08-08 Thread .
Forget my solution. This one's way easier and probably more accurate, if your program has to wait exactly 5 minutes. - Original Message - From: "Barry Carroll" <[EMAIL PROTECTED]> To: "'Yacketta, Ronald'" <[EMAIL PROTECTED]>; "Beginners (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, Augu

Re: a little help here please

2001-08-08 Thread Karthik Krishnamurthy
set a SIGALRM handler and an alarm for 5 minutes. set a flag from the handler. do the parsing only if the flag is set. /kk > - Original Message - > From: "Yacketta, Ronald" <[EMAIL PROTECTED]> > To: "Beginners (E-mail)" <[EMAIL PROTECTED]> > Sent: Wednesday, August 08, 2001 5:43 AM > Subj

Re: DBI for Access

2001-08-08 Thread Thomas A . Lowery
On Wed, Aug 08, 2001 at 09:07:31AM -0700, E. Alan Hogue wrote: > I need to hook up to an Access database running, of > course, on a win32 system. I am completely new to DBI. > I found a DBD on CPAN for ODBC, but the documentation > attached to it only covered using it with Cygwin. I > would love

Re: string into an array

2001-08-08 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 8, Tyler Longren said: >I'm grepping a file for a short string (dns3): >my $command = "cat $file | grep -i dns3"; >my $exec = `$command`; > >This will give me many lines for a result. If I did a print "$exec"; >all of the data would be printed at once. How Do I get the results >from the

Re: Hit counters

2001-08-08 Thread Ask Bjoern Hansen
[EMAIL PROTECTED] (Peter Scott) writes: > At 04:39 PM 8/8/01 -0500, Mooney Christophe-CMOONEY1 wrote: > >this explains a lot. > > > >only in Windows ... ;) > > It's the Sircam virus. I've received variants of this message 10-20 > times a day for the last 5 days. The person who sent it wouldn't

Re: string into an array

2001-08-08 Thread Ask Bjoern Hansen
[EMAIL PROTECTED] (Tyler Longren) writes: > Hello everyone, > > I'm grepping a file for a short string (dns3): > my $command = "cat $file | grep -i dns3"; > my $exec = `$command`; grep can search in files too, so you could do it like `grep -i dns3 $file`. But you are calling an external proces

Re: A little off topic.

2001-08-08 Thread Jim Conner
At 11:07 PM 08.08.2001 -0400, Rex Arul wrote: >Please visit http://www.activestate.com . They have PerlApp and PerlCOM >tools as part of the Perl Development Kit. > >With PerlApp you can generate free running EXEs and with PerlCOM you can >create DLLs which can be invoked by any VB/VBScript/JScrip

Re: string into an array

2001-08-08 Thread Michael Fowler
On Wed, Aug 08, 2001 at 10:13:11PM -0500, Tyler Longren wrote: > I'm grepping a file for a short string (dns3): > my $command = "cat $file | grep -i dns3"; > my $exec = `$command`; > > This will give me many lines for a result. If I did a print "$exec"; > all of the data would be printed at once

Re: Graphs in perl ....

2001-08-08 Thread jeffl
Try the GD module, its a Stein!!! jeff On Wed, 8 Aug 2001, Elie De Brauwer wrote: > Date: Wed, 8 Aug 2001 20:16:07 +0200 > From: Elie De Brauwer <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Graphs in perl > > I'm looking for a modules that can create graphs, i want a