RE: -d test file

2002-01-21 Thread COLLINEAU Franck FTRD/DMI/TAM
Title: RE: -d test file I've found. I have to put the absolute path. Is there a way without absolute path ? Franck -Message d'origine- De : COLLINEAU Franck FTRD/DMI [mailto:[EMAIL PROTECTED]] Envoyé : mardi 22 janvier 2002 08:15 À : [EMAIL PROTECTED] Objet : -d test file Greeti

-d test file

2002-01-21 Thread Franck Collineau
Greetings, I have the following code: #!/usr/bin/perl -w $chemin="/home/collineau/tests"; opendir (DIR,"$chemin") || die " impossible d'ouvrir le répertoire $chemin $!"; while ($rep=readdir DIR) { print "$rep\n"; $a =-d $rep; print "$a\n"; } The output is: .. 1 ... 1 T

Re: cronjob problem

2002-01-21 Thread sachin balsekar
hey, u cud direct o/p of the script to a file...that u mail it to yourself using some script... something like * * * * * script >> logfile 2>&1 & in the end of the cron u cud get u r mailing script called in ... this shud also take care of errors in the cron ( i mean the scrip entered in th

Re: cronjob problem

2002-01-21 Thread Rahul Garg
Hello, I am running crontab command. I want the output of commands in crontab file to be mailed to me. I am expecting the output that is printed out on terminal to be mailed to me... For that I am setting the MAILTO environment variable at the beginning of crontab file. MAILTO="" But it

cronjob problem

2002-01-21 Thread Rahul Garg
Hello, I am running crontab command. I want the output of commands in crontab file to be mailed to me. For that I am setting the MAILTO environment variable at the beginning of crontab file. MAILTO="" But its not working though the commands in crontab file are working fine. Also, if I am

Fw: cronjob problem

2002-01-21 Thread Rahul Garg
Hello, I am running crontab command. I want the output of commands in crontab file to be mailed to me. For that I am setting the MAILTO environment variable at the beginning of crontab file. MAILTO="" But its not working though the commands in crontab file are working fine. Also, if I am

connecting perl to windows db

2002-01-21 Thread louie miranda
$dbh = DBI->connect("dbi:mysql:world", "username", "mypassword", { RaiseError => 1 } ); Hi, does connecting perl to a windows db differ from what? like mysql it will connect using that example on top, sample only. k? thanks, louie... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Appending to a file name..

2002-01-21 Thread Eric
Two posts in one day; wowza.. anyhoo I am making a cgi script that lets a user upload an image file, and then from there - it resizes it - then spits the resized version out. The thing is, I need to have unique file name generated for the resized image file - so for example, say a user up

RE: Perl Module for Server Statistics

2002-01-21 Thread Hamid Majidy
If your OS supports an SNMP agent, you might want to try SNMP-Monitor module. Good Luck, Hamid. -Original Message- From: Andre' Solomon [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 10:08 PM To: [EMAIL PROTECTED] Subject: RE: Perl Module for Server Statistics Hi, I'm looki

RE: Perl Module for Server Statistics

2002-01-21 Thread Andre' Solomon
Hi, I'm looking for a Perl Module that would allow me to determine some basic server statistics such as uptime, CPU usage per process, total CPU usage, disk usage, etc. Can someone point me in the right direction please. Thanks, Andre'

Re: Array Problem

2002-01-21 Thread Leon
- Original Message - From: "maureen" <[EMAIL PROTECTED]> To: "Leon" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 8:39 AM Subject: Re: Array Problem > if ($username ne /$in{username}/) > { Anything in between the forward slash are usually used as a regular ex

Term::ReadKey on Win32 Changing Readmode?

2002-01-21 Thread GoodleafJ
Okay, I've got a little script that takes user passwords on a Win32 terminal client. I've used Term::ReadKey from the activestate module list to turn off screen echo. So it's something like sub{ ReadMode 2; #turns off echo Prompt for password; Get password; ReadMode 1; #should turn echo back on }

How do I start or load a new page

2002-01-21 Thread Remo, Sherwin
Hi! Is there a command in perl that refreshes the screen? Like the clear(); command in C or the CLS in DOS prompt or CLEAR in Unix. I would like the script to clear the window when I run it. In so that it would look more presentabel and info. would be more easy to spot. Thanks! -- To unsubsc

Re: Re[2]: [PBML] regex - quick way ?

2002-01-21 Thread Jonathan E. Paton
> the original regex that Gordon said "worked" was: > > : >> if ($line =~ m/.*\,.*\,.*\,.*\,.*\,.*/){ > > which would match "," quite happily. perhaps in this > application it's expected that there won't be anything > between the commas... if ($line =~ m/(?:[^,]+\,){5}[^,]+/)) { should do

Form->Click questions

2002-01-21 Thread Guy Davis
Hi all, I'm just learning Perl and have been thrown into the fire so to speak. I have many years of programming background but because of my limited experience with Perl and the nature of the project I'm working on (wanting results quickly) I'm having some questions that are probably pretty ob

RE: Question -

2002-01-21 Thread Hanson, Robert
Not the way you are thinking, but yeah, it can be done... # Untested! my %data; foreach my $name ( param() ) { # match the format, grab the data, and skip # irrelevant form fields $name =~ /^(\w+)_(\s+)$/; my $type = $1; my $num = $2; next unless ( $type ); $data{$num}->{$type} = p

RE: How to resize images with perl

2002-01-21 Thread Matt C.
You'll need to have the ImageMagick libraries installed on your system, as Image::Magick is just an api for them (almost certainly why your installs of Image::Magick are breaking). I just installed this yesterday and am super impressed. Very easy to use and faster than I thought. Only odd thing is

RE: How to resize images with perl

2002-01-21 Thread Hanson, Robert
Check out the Image Magick page, it might help fix your problem. If you are using ActivePerl you should get the entire package from ActiveState using ppm, on Unix you need to install Image Magick then Perl Magick. Anyway, here is the URL... http://www.simplesystems.org/ImageMagick/www/perl.html

RE: How to resize images with perl

2002-01-21 Thread Eric
Awesome! is there anyway to do this using GD also? image magick wont seem to install from CPAN - keeps returning bad make status. Thanks again, ~Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: The => in Hashes

2002-01-21 Thread Bob Showalter
> -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 21, 2002 3:17 PM > To: Bob Showalter > Cc: 'Dean Theophilou'; Perl_beginner (E-mail) > Subject: RE: The => in Hashes > > > On Jan 21, Bob Showalter said: > > >=> only quotes a bareword th

RE: How to resize images with perl

2002-01-21 Thread Hanson, Robert
Try Image::Magick. use Image::Magick; my $im = new Image::Magick(); $im->Read($inputfile); $im->Resize( geometry => "200x200" ); $im->Write($outputfile); undef $im; Rob -Original Message- From: Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 3:10 PM To: [EMAIL PROTECTED

RE: The => in Hashes

2002-01-21 Thread Jeff 'japhy' Pinyan
On Jan 21, Bob Showalter said: >=> only quotes a bareword that is a legal identifier name, with >an optional leading minus sign. Key1 in your example qualifies, so >there is no need to quote it. Something like "First Name", or >"123" doesn't qualify, so they need to be quoted. 123 does not requi

RE: The => in Hashes

2002-01-21 Thread Bob Showalter
> -Original Message- > From: Dean Theophilou [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 21, 2002 3:03 PM > To: Perl_beginner (E-mail) > Subject: RE: The => in Hashes > > > Well, suppose we had this: > > %Day = ( > "Sun" => "Sunday", > "Mon" => "Monday", > ); > > Wou

How to resize images with perl

2002-01-21 Thread Eric
Hello all, I have a directory of various .jpg and .gif files - and would like to resize to them to a smaller size all at one time - is there a perl module or any hints that could help me out? Thanks in advanced. ~Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

RE: The => in Hashes

2002-01-21 Thread Dean Theophilou
Well, suppose we had this: %Day = ( "Sun" => "Sunday", "Mon" => "Monday", ); Wouldn't these keys be legal identifier names? And if so, then why quote them? -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 11:27 AM To: 'Dea

RE: SEND

2002-01-21 Thread Russ Foster
As was pointed out before, it's probably difficult (if not impossible) to have perl access an already open telnet session. However, I have accomplished a similar task by using perl to copy to/from the Windows clipboard (of course, this precludes that you're using Windows). Here's the process (in

RE: The => in Hashes

2002-01-21 Thread Bob Showalter
> -Original Message- > From: Dean Theophilou [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 21, 2002 2:16 PM > To: Perl_beginner (E-mail) > Subject: The => in Hashes > > > Hello: > > There have been many times that I have seen a hash like this: > > %Hash = ("Key1" => "Value1"

The => in Hashes

2002-01-21 Thread Dean Theophilou
Hello: There have been many times that I have seen a hash like this: %Hash = ("Key1" => "Value1"); My question is that if the => operator quotes stuff to the left of it, then why bother quoting the Key1 portion of the hash definition? Also, what the !@#$!@# is "foo"! :)

RE: help needed with testing variable in an if statement

2002-01-21 Thread Thisell, Andrea
Your format is exactly the way that I've done similar things, except for putting another double quote after the abc (I assume that was just a typo anyway). And make sure to use semicolons at the end of your statements inside the if statement. But otherwise, I think you one way to do it already.

Re: STDIN

2002-01-21 Thread Vicky Lorenzo
Hi Walter, You can use CPAN module Term::ReadKey: use Term::ReadKey; ReadMode('noecho'); $password = ReadLine(0); I got this from O'Reilly's Perl Cookbook page 529 :) -vicky --- walter valenti <[EMAIL PROTECTED]> wrote: > Hi, > someone knows, how insert text gron STDIN, without > see this on

RE: Question -

2002-01-21 Thread Hanson, Robert
I think this is what you wanted... use CGI qw/:standard/; # Loop over each field name in the form foreach my $name ( param() ) { # If the name starts with "ID_" ending with a number if ( $name =~ /^ID_\d+$/ ) { print "It's an ID! The value = " . param($name) . ""; } # If the name st

Re: help needed with testing variable in an if statement

2002-01-21 Thread Vicky Lorenzo
Hi Anadi, Hope this helps: #!/tools/bin/perl -w print "enter a number\n"; $a = ; if ($a == 12 or $a== 8) {print "right\n";} else {print "incorrect\n";} #end of script -vicky --- A Taylor <[EMAIL PROTECTED]> wrote: > Hi all, > I am trying to test three variables in an 'if' > statement eg: >

Problem with Hashes

2002-01-21 Thread Kennedy, Todd
Hello, I hope someone can help me. I am attempting to modify a perl script that uses hashes and my problem is that I am trying to add hashes values to the array $o_traffic_rec but I can't seem to reference the value of the new hash. The array is defined as $o_traffic_rec{hosts}{$var1} I am tryi

help needed with testing variable in an if statement

2002-01-21 Thread A Taylor
Hi all, I am trying to test three variables in an 'if' statement eg: if ($a eq "abc and $b eq "efg" and $c eq "hi") { do some code . } how do i do this in perl Thanks in advance Anadi _ Send and receive Hotmail on your

RE: Question -

2002-01-21 Thread Hanson, Robert
You could use CGI.pm. use CGI qw/:standard/; foreach my $name ( param ) { # Skip everything except ID_# vars next unless ( $name =~ /^ID_\d+$/ ); # Handle variable here print "$name = ".param($name); } Is that what you were asking or did you want to pass the vars between pages? If you n

Re: to die, croke, or confess

2002-01-21 Thread Jenda Krynicky
From: "Alex Harris" <[EMAIL PROTECTED]> > I need to place code that leaves my program entirely if certain errors > occur (mostly on opening a file). However I don't want ANY messages > going anywhere except my $errlog. (I noticed die, seem to always show > a message at the comm

leaving the checkbox checked after it is checked

2002-01-21 Thread Vicky Lorenzo
not by default that is. I apologize for double posting, I've been warned that my subject was too vague. Hello everyone, I hope someone can help me with this problem. Here is what I am trying to do: - Job request is entered in Form-A. - When Form-A is submitted, apple.cgi tells the user the fo

Re: Array Problem

2002-01-21 Thread maureen
Thanks so much for your help on this. I tried this suggestion, but unfortunately, the array @indata does not seem to contain the usernames from the file pwdata.txt. I've been looking at this for hours. I hope someone can help me figure out what I am missing here. The objectives for this code and

Question -

2002-01-21 Thread Imtiaz ahmad
Can someone please help me with the following: I need to have variable names like ID_1, ID_2, ID_3 ...ID_n. How can I read them on the next page after submitting through a FORM using POST method? thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

cgi question

2002-01-21 Thread Vicky Lorenzo
Hello everyone, I hope someone can help me with this problem. Here is what I am trying to do: - Job request is entered in Form-A. - When Form-A is submitted, apple.cgi tells the user the form is successfully submitted and at the same time appends the request into an html file (banana.html) tha

RE: Using system variables (M$ OS's)

2002-01-21 Thread Mason, Andrew
Fantastic! Thankyou. From: Briac Pilpré [mailto:[EMAIL PROTECTED]] Sent: 21 January 2002 16:05 To: [EMAIL PROTECTED] Subject: Re: Using system variables (M$ OS's) Andrew Mason wrote: > I would like to print a line containing the value of a system variable > (I'm running on M$ NT4). #!/usr/bin/

Re: Using system variables (M$ OS's)

2002-01-21 Thread Jeff 'japhy' Pinyan
On Jan 21, Mason, Andrew said: >My system variable is %IPADDRESS%. You can access that via $ENV{IPADDRESS} in your Perl program. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look fo

Re: Using system variables (M$ OS's)

2002-01-21 Thread Briac Pilpré
Andrew Mason wrote: > I would like to print a line containing the value of a system variable > (I'm running on M$ NT4). #!/usr/bin/perl -w use strict; print "Blah blah $ENV{IPADDRESS} blah!\n"; __END__ -- briac << dynamic .sig on strike, we apologize for the inconvenience >> -- To unsubsc

Using system variables (M$ OS's)

2002-01-21 Thread Mason, Andrew
I would like to print a line containing the value of a system variable (I'm running on M$ NT4). My system variable is %IPADDRESS%. At the moment my code looks like chomp ($IpAddress=`echo %IPADDRESS%`); print "blah blah $IpAddress blah"; Is there a better/preferable way of doing this? Cheers,

Re: PERLDB_OPTS

2002-01-21 Thread Jenda Krynicky
From: Babichev Dmitry <[EMAIL PROTECTED]> > >> How i can change environment variables (e.g. PERLDB_OPTS) to any > >> values so they remained general(public) for all instances of perl > >> scripts? > > BS> Typically you accomplish this kind of thing by setting the > variable i

Re: file tests

2002-01-21 Thread Jeff 'japhy' Pinyan
On Jan 21, Franck Collineau said: >#!/usr/bin/perl -w >$chemin="/home/collineau/tests"; >opendir (DIR,"$chemin") || die " impossible d'ouvrir le répertoire $chemin >$!"; >while ($rep=readdir DIR) >{ > print "$rep\n"; > $a =-d $rep; > print "$a\n"; >} >Techmedia Broadband home

file tests

2002-01-21 Thread Franck Collineau
Greetings, I have the following code: #!/usr/bin/perl -w $chemin="/home/collineau/tests"; opendir (DIR,"$chemin") || die " impossible d'ouvrir le répertoire $chemin $!"; while ($rep=readdir DIR) { print "$rep\n"; $a =-d $rep; print "$a\n"; } The output is: .. 1 ... 1 T

RE: LWP

2002-01-21 Thread Bob Showalter
> -Original Message- > From: Daniel Llewellyn [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 19, 2002 10:10 PM > To: [EMAIL PROTECTED] > Subject: LWP > > > ok, looking through the archive - all the way down the 18000 > posts, I have > worked out that LWP is my friend. However, I h

RE: Exchange mailbox size

2002-01-21 Thread John Edwards
If you set the logging options of Exchange to the correct level, whenever a user is sent a storage limit warning it will be recorded in the eventlog of the mail server. This can then be extracted using Perl if you wish. John -Original Message- From: Simon Rowan [mailto:[EMAIL PROTECTED]]

RE: Exchange mailbox size

2002-01-21 Thread Simon Rowan
Ideally, I would like to log these to a file for reporting, so thought PERL would be the best way of doing this. THanks Simon -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: 21 January 2002 13:07 To: 'Simon Rowan'; 'PERL beginners' Subject: RE: Exchange mailbox si

RE: using force with cpan?

2002-01-21 Thread Bob Showalter
> -Original Message- > From: tom poe [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 19, 2002 11:48 PM > To: [EMAIL PROTECTED] > Subject: using force with cpan? > > > Hi: I am running cpanv1.59, and with root. > > I notice that there are multiple failures at make install > Won

Re: I cant run perl from the dos command line

2002-01-21 Thread Alfred Wheeler
Hmm.You've probably already got it all figured it out by now, however - The message you report means the command processor cannot find perl. What changed recently? Did you type into the prompt exactly what you wrote below? If so, try C:\Perl\bin\perl.exe -w C:\Perl\eg\example.pl rabs wrote

RE: to die, croak, or confess

2002-01-21 Thread John Edwards
You can do this die "\n"; The newline means die will not print anything out to STDOUT. (other than a new line...) HTH John -Original Message- From: Alex Harris [mailto:[EMAIL PROTECTED]] Sent: 21 January 2002 14:22 To: [EMAIL PROTECTED] Subject: to die, croak, or confess I need to p

to die, croke, or confess

2002-01-21 Thread Alex Harris
I need to place code that leaves my program entirely if certain errors occur (mostly on opening a file). However I don't want ANY messages going anywhere except my $errlog. (I noticed die, seem to always show a message at the command line). What's the best way to handle say the following th

Re: to die, croak, or confess

2002-01-21 Thread Jeff 'japhy' Pinyan
On Jan 21, Alex Harris said: >I need to place code that leaves my program entirely if certain errors occur >(mostly on opening a file). However I don't want ANY messages going >anywhere except my $errlog. (I noticed die, seem to always show a message >at the command line). What's the best w

to die, croak, or confess

2002-01-21 Thread Alex Harris
I need to place code that leaves my program entirely if certain errors occur (mostly on opening a file). However I don't want ANY messages going anywhere except my $errlog. (I noticed die, seem to always show a message at the command line). What's the best way to handle say the following the

Exchange mailbox size

2002-01-21 Thread Simon Rowan
Does anybody know of a module that will return the total size of a users Exchange 5.5 mailbox. I want to be able to give users who have large mailboxes loads of automated grief !! Cheers ___ Evolution is the investment banking and venture capital indu

Re: local() vs. my()

2002-01-21 Thread Jonathan E. Paton
> Can anyone explain the difference between my() and > local() ? Yes > The manual says that I usually want to use my() but > what exactly happens to a variable using local? my() creates a brand new variable, which is undef unless you specify otherwise. It is only visible within the current lex

Re: local() vs. my()

2002-01-21 Thread sachin balsekar
hi, may be this would help... http://perl.about.com/library/weekly/aa022801a.htm ciao, sachin balsekar. Stefan Kredler wrote: >can anyone explain the difference between my() and >local() ? > >The manual says that I usually want to use my() but >what exactly happens to a variable using local?

local() vs. my()

2002-01-21 Thread Stefan Kredler
can anyone explain the difference between my() and local() ? The manual says that I usually want to use my() but what exactly happens to a variable using local? thanks for any advice. greetings, stefan __ Do You Yahoo!? Send FREE video emails in

Re: object orientation :- please help

2002-01-21 Thread Frank
On Sat, Jan 19, 2002 at 04:23:38AM +, padu wrote: > I am newbie at Perl. [snip] > Is it anyway possible to Extend the above program with > constructors for rectangle and circle and a > non-virtual function "move" to change the reference > point of any of these objects. > > Can anybody help

Re: creating labels in MS ACCESS

2002-01-21 Thread Jenda Krynicky
From: <[EMAIL PROTECTED]> > This might not be the right place for this question, but I trust this > group. > > My boss wants me to create a mailing list from > his MS ACCESS database. I am not an MS fun, but I cannot tell him this. > > So my question is how do I create labels

Re: finishing a script

2002-01-21 Thread Jenda Krynicky
From: "Chris Zampese" <[EMAIL PROTECTED]> To: "perl list" <[EMAIL PROTECTED]> Subject:finishing a script Date sent: Mon, 21 Jan 2002 10:31:10 +1300 > Hi All, > Just needing help regarding ending a script properly. I have a

Re: $~ ?

2002-01-21 Thread Frank
On Sat, Jan 19, 2002 at 11:40:14PM +0800, yun wrote: > I found in perl samples many strange signs, I'm really > confused by them and the study process is seriousl > blocked, would you like to recommend some good method > to pass this basic step? some quick lookup or some > common-used cmd? Thanks