Re: DBI - SELECT by Date

2005-05-06 Thread John Doe
Am Donnerstag, 5. Mai 2005 22.46 schrieb Diogo Nunes de Oliveira: Hi all, Hi Diogo I´m having quite a problem here... My script works with postgree. Now i want to get a result from a date range... But I just can´t get it done... Explaining... Let´s supose I want to get all registers from

Re: transform array into hash

2005-05-06 Thread John Doe
Am Donnerstag, 5. Mai 2005 23.07 schrieb Ing. Branislav Gerzo: Hi all, just easy question, here is too much hours and my brain doesn't work any more. How to transform array into hash ? my @array = 1..4; I want to have: %hash = ( one = 1, two = 2, three = 3, four = 4 ); tried something

Re: transform array into hash

2005-05-06 Thread Ing. Branislav Gerzo
John Doe [JD], on Friday, May 6, 2005 at 10:10 (+0200) thinks about: JD Another solution (beside Xavier's one) with no need to know the number of JD elements: JD my $i=0; # or even: my $i; my %hash=map {$_ = ++$i} qw /one two three four/; yes, I thought about this one too, but Xaviers one is ok

SFTP

2005-05-06 Thread Octavian Rasnita
Hi, Does anyone know a perl module that can be used to get the files from a secure FTP server that listens to port 22? Thanks. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: SFTP

2005-05-06 Thread Octavian Rasnita
Hi, No need to respond. I have found the right module... I think. Thank you. Teddy From: Octavian Rasnita [EMAIL PROTECTED] Hi, Does anyone know a perl module that can be used to get the files from a secure FTP server that listens to port 22? Thanks. Teddy -- To

Re: SFTP

2005-05-06 Thread Ing. Branislav Gerzo
Octavian Rasnita [OR], on Friday, May 6, 2005 at 10:03 (+0300) thinks about: OR No need to respond. I have found the right module... I think. good luck with Net::SFTP under windoze. If you will have problems, just look to thread: mid:[EMAIL PROTECTED] -- How do you protect mail on web? I use

jscript help

2005-05-06 Thread Brent Clark
Hi All My deepest apologies for posting here, but im so stuck with Javascript at the moment. I have a html file when on loading executes a javascript function (random_mainpage() ). which reads the array (sarray) and displays in content on the browser. I to have a link that onclicking must execute

Re: SFTP

2005-05-06 Thread Octavian Rasnita
good luck with Net::SFTP under windoze. If you will have problems, just look to thread: mid:[EMAIL PROTECTED] Thank you. I have found some problems with Net::SFTP under Windows, because it tells me that: Can't map service name 'ssh' to port number at D:/usr/site/lib/Net/SFTP.pm line 36

Re: SFTP

2005-05-06 Thread Ing. Branislav Gerzo
Octavian Rasnita [OR], on Friday, May 6, 2005 at 12:25 (+0300) typed: OR Thank you. I have found some problems with Net::SFTP under Windows, because OR it tells me that: OR Can't map service name 'ssh' to port number at D:/usr/site/lib/Net/SFTP.pm OR line 36 yes, you are on beginning of

RE: SFTP

2005-05-06 Thread Ankur Gupta
From: Octavian Rasnita [mailto:[EMAIL PROTECTED] good luck with Net::SFTP under windoze. If you will have problems, just look to thread: mid:[EMAIL PROTECTED] Thank you. I have found some problems with Net::SFTP under Windows, because it tells me that: Can't map service name

Re: Why don't I need a to call a function?

2005-05-06 Thread Ricardo SIGNES
* Siegfried Heintze [EMAIL PROTECTED] [2005-05-06T01:02:59] I've been studying this sample code that someone gave to me in response to one of my earlier queries. Why is it not necessary to put a in front of DBH in the statement DBH-prepare? sub DBH { [ ... ] } my $sth = DBH-prepare ( qq

How would I simulate this in Perl?

2005-05-06 Thread macromedia
Hello, I have the following find/grep line running just fine from a telnet prompt on the server. I'm trying to include this line into a web app using CFEXECUTE (ColdFusion) but can't get it to work. I know that a compiled perl script would work since I'm already using some previously written

Re: Why don't I need a to call a function?

2005-05-06 Thread Randal L. Schwartz
Ricardo == Ricardo SIGNES [EMAIL PROTECTED] writes: Ricardo Here are some of the reasons you'd need : RicardoThe subroutine has a prototype, and you want to circumvent it. Ricardosub foo($$) { ... } Ricardofoo(1); RicardoYou want

Calling a subroutine - strict very strict

2005-05-06 Thread Tielman Koekemoer \(TNE\)
Hi All, I apologise for the newbie question straight off - I don't have my Camel book with me to consult. Why does the following give me an error?: -- #!/usr/bin/perl -w # # A script that gets a list of technologies that have events on Display layer. # use strict; sub q_db

Re: Calling a subroutine - strict very strict

2005-05-06 Thread Prasanna Kothari
what is param.? If it's a variable, and not declared, qualify it using my or local. Else, if it's a string that you want pass to the function, use single quotes. -Prasanna Tielman Koekemoer (TNE) wrote: Hi All, I apologise for the newbie question straight off - I don't have my Camel book with me

RE: Calling a subroutine - strict very strict

2005-05-06 Thread Tielman Koekemoer \(TNE\)
Thanks Prasanna, that fixed it. -Original Message- From: Prasanna Kothari [mailto:[EMAIL PROTECTED] Sent: 06 May 2005 02:26 PM To: beginners@perl.org Cc: Tielman Koekemoer (TNE) Subject: Re: Calling a subroutine - strict very strict what is param.? If it's a variable, and not declared,

RE: Calling a subroutine - strict very strict

2005-05-06 Thread Tielman Koekemoer \(TNE\)
Maybe I should tell you what fixed it: The param was a string so enclosed it in single quotes. Thanks! -Original Message- From: Tielman Koekemoer (TNE) [mailto:[EMAIL PROTECTED] Sent: 06 May 2005 02:33 PM To: [EMAIL PROTECTED]; beginners@perl.org Subject: RE: Calling a subroutine -

Where will I find perl scripts

2005-05-06 Thread Tielman Koekemoer \(TNE\)
Hi All, I think I'm like most people learn Perl easier when examining other guru's scripts. Where is the best place on the net to find Perl scripts that do everything, from doing pattern matching in arrays to making coffee? Right now, however, I think pattern matching in arrays is more

Re: Where will I find perl scripts

2005-05-06 Thread John Doe
Am Freitag, 6. Mai 2005 15.51 schrieb Tielman Koekemoer (TNE): Hi All, I think I'm like most people learn Perl easier when examining other guru's scripts. Where is the best place on the net to find Perl scripts that do everything, from doing pattern matching in arrays to making coffee?

Re: How to follow a Java script link

2005-05-06 Thread perlocean
- Original Message - From: Peter Rabbitson [EMAIL PROTECTED] To: beginners@perl.org Sent: Thursday, May 05, 2005 6:40 PM Subject: Re: How to follow a Java script link On Thu, May 05, 2005 at 11:40:52AM -0500, Sergio Ulises Sanchez Buelna wrote: Hello all I am trying to harvest a set of

Re: Where will I find perl scripts

2005-05-06 Thread Wiggins d'Anconia
Tielman Koekemoer (TNE) wrote: Hi All, I think I'm like most people learn Perl easier when examining other guru's scripts. Where is the best place on the net to find Perl scripts that do everything, from doing pattern matching in arrays to making coffee? Right now, however, I think

Writing my first perl script

2005-05-06 Thread macromedia
Hello, I'm not sure about the login or how I should approach what I want to achieve. I require a script that does the following. 1. Search a directory and all sub-directories for a certain file extension. (Ex. .txt) 2. Get the results of the above search and check inside each file for a string

gcc on Solaris

2005-05-06 Thread Larsen, Errin M HMMA/IT
Hi Perl folks, I want to compile the latest version of Perl on my Solaris 9 server, targeting that same Solaris 9 environment. I have downloaded and installed gcc (because, in it's infinite wisdom, Sun does not ship Solaris with a pre-installed compiler?!) and intend to use it. As a test, I

Re: Writing my first perl script

2005-05-06 Thread Gavin Henry
quote who=macromedia Hello, I'm not sure about the login or how I should approach what I want to achieve. I require a script that does the following. Here are the quick answer, which provide you some reading material: 1. Search a directory and all sub-directories for a certain file

Re: Where will I find perl scripts

2005-05-06 Thread Gavin Henry
quote who=Wiggins d'Anconia Tielman Koekemoer (TNE) wrote: Hi All, I think I'm like most people learn Perl easier when examining other guru's scripts. Where is the best place on the net to find Perl scripts that do everything, from doing pattern matching in arrays to making coffee? Right

RE: Writing my first perl script

2005-05-06 Thread macromedia
Something like this? #!/usr/bin/perl -w #Syntax: test.pl directory match require 5.000; use strict; # Pass filename parameter my $path = $ARGV[0]; my $num = $ARGV[1]; while ($line = $path*.txt) { open (FILE, $line) or die cannot open $line: $!\n; while (FILE) { if ($line =~

Re: How would I simulate this in Perl?

2005-05-06 Thread Offer Kaye
On 5/6/05, macromedia wrote: Hello, I have the following find/grep line running just fine from a telnet prompt on the server. I'm trying to include this line into a web app using CFEXECUTE (ColdFusion) but can't get it to work. I know that a compiled perl script would work since I'm already

Re: Writing my first perl script

2005-05-06 Thread Gavin Henry
On Friday 06 May 2005 16:50, macromedia wrote: Something like this? #!/usr/bin/perl -w #Syntax: test.pl directory match require 5.000; use strict; # Pass filename parameter my $path = $ARGV[0]; my $num = $ARGV[1]; while ($line = $path*.txt) { open (FILE, $line) or die cannot open

RE: Writing my first perl script

2005-05-06 Thread macromedia
not quite. Getting these errors... perl test.pl d:/mywork/ 123 Global symbol line requires explicit package name at test.pl line 12. Variable $line is not imported at test.pl line 13. Global symbol line requires explicit package name at test.pl line 13. Variable $line is not imported at test.pl

Re: Writing my first perl script

2005-05-06 Thread Michael Gale
Hello, A bash script would be a better choice for this particular request. #!/bin/bash find . -type f -name *.txt -print | xargs grep -l 123 externalfile The above command would search the current directory plus all sub- directories for all files the end in a .txt and search each file

RE: How would I simulate this in Perl?

2005-05-06 Thread macromedia
I just tried it but get this error. What does it mean/ perl test.pl Global symbol line requires explicit package name at test.pl line 18. Variable $line is not imported at test.pl line 19. Global symbol line requires explicit package name at test.pl line 19. Execution of test.pl aborted due to

RE: How would I simulate this in Perl?

2005-05-06 Thread Ankur Gupta
I have the following find/grep line running just fine from a telnet prompt on the server. I'm trying to include this line into a web app using CFEXECUTE (ColdFusion) but can't get it to work. I know that a compiled perl script would work since I'm already using some previously written

Re: Writing my first perl script

2005-05-06 Thread Offer Kaye
On 5/6/05, macromedia wrote: Hello, I'm not sure about the login or how I should approach what I want to achieve. I require a script that does the following. 1. Search a directory and all sub-directories for a certain file extension. (Ex. .txt) 2. Get the results of the above search

Re: How would I simulate this in Perl?

2005-05-06 Thread John W. Krahn
macromedia wrote: Hello, Hello, I have the following find/grep line running just fine from a telnet prompt on the server. I'm trying to include this line into a web app using CFEXECUTE (ColdFusion) but can't get it to work. I know that a compiled perl script would work since I'm already using some

Re: How would I simulate this in Perl?

2005-05-06 Thread Offer Kaye
On 5/6/05, macromedia wrote: I just tried it but get this error. What does it mean/ perl test.pl Global symbol line requires explicit package name at test.pl line 18. Variable $line is not imported at test.pl line 19. Global symbol line requires explicit package name at test.pl line 19.

RE: How would I simulate this in Perl?

2005-05-06 Thread macromedia
This is the version of Perl I have. D:\reportsperl -v This is perl, version 5.003_07 Copyright 1987-1996, Larry Wall + suidperl security patch Win32 port Copyright (c) 1995-1996 Microsoft Corporation. All rights reserved. Developed by ActiveWare

Re: How would I simulate this in Perl?

2005-05-06 Thread Randal L. Schwartz
Macromedia == Macromedia [EMAIL PROTECTED] writes: Macromedia find D:\mywork -name '*.txt' -exec grep '000;' '{}' \; -print use File::Finder; my @files = File::Finder-name('*.txt')-contains(qr/000;/)-in('D:/mywork'); File::Finder is in the CPAN. -- Randal L. Schwartz - Stonehenge Consulting

Script critique?

2005-05-06 Thread Jason Balicki
Hello, I have several locations with a hardware VPN device and I've set them up to log to a central logging server. Some of the managers of these facilities would like to have a report showing who's using the VPN and when. I've written a script that does that. It works, but as I'm pretty new

RE: Script critique?

2005-05-06 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jason Balicki wrote: Hello, I have several locations with a hardware VPN device and I've set them up to log to a central logging server. Some of the managers of these facilities would like to have a report showing who's using the VPN and when. I've written a script that does that. It

Re: Script critique?

2005-05-06 Thread Gavin Henry
On Friday 06 May 2005 22:41, Jason Balicki wrote: Hello, I have several locations with a hardware VPN device and I've set them up to log to a central logging server. Some of the managers of these facilities would like to have a report showing who's using the VPN and when. I've written a