Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
On Wednesday 29 Sep 2004 03:19, you wrote: > You know, I'm kinda going through a similar thing. I wrote a script to > search for users in an LDAP directory and update an attribute at the same > time. I decided to write it in Perl because it looked so easy. And, it was. > Works like a champ. Being n

Using variables to store statements/formulae in perl

2004-09-28 Thread Murphy, Anthony
Hello Perl Beginners, I'm writing a program in perl that collects data about calls into a telephone system and presents some statistics based on it. There could come a time in the future where different data needs to be used and different statistics need to be reported on so I'm trying to keep th

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Drue Reeves
You know, I'm kinda going through a similar thing. I wrote a script to search for users in an LDAP directory and update an attribute at the same time. I decided to write it in Perl because it looked so easy. And, it was. Works like a champ. Being new to Perl, and this was my first script, I was

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Chris Devers
On Tue, 28 Sep 2004, Wiggins d Anconia wrote: > On Tue, 28 Sep 2004, Chris Devers wrote: > > > On Tue, 28 Sep 2004, Errin Larsen wrote: > > > > > On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya > > > <[EMAIL PROTECTED]> wrote: > > > > > > > use vars qw($f); > > > > > > The above is good, b

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
On Tuesday 28 Sep 2004 22:11, John W. Krahn wrote: > Gavin Henry wrote: > > By the way, my program now works great thanks to your sub advice. I still > > have some cleaning to do, like my resize sub abd incorporating file tests > > etc. > > > > You can see how bad my program is at: > > > > http://w

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Wiggins d Anconia
> On Tue, 28 Sep 2004, Errin Larsen wrote: > > > On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya > > <[EMAIL PROTECTED]> wrote: > > > > > use vars qw($f); > > > > The above is good, but is now obsolete. > > That is debatable. > Please, beginners, recognize the above word, *debatable*!! I

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread John W. Krahn
Gavin Henry wrote: By the way, my program now works great thanks to your sub advice. I still have some cleaning to do, like my resize sub abd incorporating file tests etc. You can see how bad my program is at: http://www.perl.me.uk It's called ebaypics Advice from you in a new thread, would be very

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread John W. Krahn
Gavin Henry wrote: I really like Perl, but lately everywhere I seem to go and talk to say I shouldn't be learning Perl as it's old and Python is better. Fortran, Cobol, Lisp, C and Basic are older and people still use them. There are always people who will say that X is better then Y (and people wh

RE: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Bob Showalter
Errin Larsen wrote: > So, what was the justification for changing 'use vars' to 'our'? I don't know, but I suspect it's because "our" is a complement to "my". Same syntax (no silly qw() business), same lexical scoping, etc. You're correct. our() should be used and 'use vars' should be considered

Re: Is there a module to manipulate NTFS permissions?

2004-09-28 Thread mgoland
- Original Message - From: "S.A. Birl" <[EMAIL PROTECTED]> Date: Tuesday, September 28, 2004 9:42 am Subject: Re: Is there a module to manipulate NTFS permissions? > On Sep 27, John ([EMAIL PROTECTED]) typed: > > John: > Then add the other users and groups: > John: > > John: > cacls

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread John W. Krahn
Edward Wijaya wrote: > Hi, Hello, > Why my code below fail to open and > print the file contents > > when I do: > > perl mycode.pl -f filename > > > __BEGIN__ > use strict; > use warnings; > > use Getopt::Std; > use vars qw($f); > getopts('f:'); getopts( 'f:' ) creates the variable $opt_f and store

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Errin Larsen
On Tue, 28 Sep 2004 15:26:08 -0400 (EDT), Chris Devers <[EMAIL PROTECTED]> wrote: > On Tue, 28 Sep 2004, Errin Larsen wrote: > > > On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya > > <[EMAIL PROTECTED]> wrote: > > > > > use vars qw($f); > > > > The above is good, but is now obsolete. > > That

Re: Yin and Yang of Programming- Everyone talks about Python and says Perl is old news.

2004-09-28 Thread jason corbett
I am a martial artist for 14 years now. I have had people ask "what is the best art to practice"? I tell them look at yourself and see where you fit, how physically fit are you, etc. Are you going to practice daily, and live the "Martial Way" like Shaolin? Do you have patience and lots of time to p

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Chris Devers
On Tue, 28 Sep 2004, Errin Larsen wrote: > On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya > <[EMAIL PROTECTED]> wrote: > > > use vars qw($f); > > The above is good, but is now obsolete. That is debatable. Gather round, and listen to the story of a log handling utility written in

RE: Measure program performance

2004-09-28 Thread Shaw, Matthew
> I need measure how much my perl program consume while it is executed. You can use the Benchmark module to determine execution times. This is included in the core module set. There is also a related FAQ page that you can read by doing: perldoc -q profile at your command prompt. There is also

Re: Is there a module to manipulate NTFS permissions?

2004-09-28 Thread Jenda Krynicky
From: "S.A. Birl" <[EMAIL PROTECTED]> > Hello All: > > I searched CPAN and parts of the Win32:: but could not find an answer. > Is there a module, etc to add/remove permissions on an NTFS folder? Win32::Perms - http://www.roth.net/perl/ Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz

Re: Problem iterating over diamond (while)

2004-09-28 Thread Errin Larsen
Hi Edward, On Tue, 28 Sep 2004 11:20:39 -0400, Bob Showalter <[EMAIL PROTECTED]> wrote: > Edward Wijaya wrote: > > Thanks a lot for your reply Bob. > > but can you be more specific: > > > > > You need to either close and reopen the file, or > > > rewind the file using seek() before you can re-rea

Re: Problem iterating over diamond (while)

2004-09-28 Thread Edward Wijaya
Many many thanks Bob! Glad to know I can do it in one-line. for ( ...blah... ) { seek(INFILE, 0, 0); # <--- rewind file back to start while () {... } } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Errin Larsen
Hi again, Edward! Just so you know, you should CC the list when you reply! On Tue, 28 Sep 2004 22:26:55 +0800, Edward Wijaya <[EMAIL PROTECTED]> wrote: > Thanks Errin, > It works just as you suggested. > Thanks so much for your thorough > explanation. Glad that I learnt much from it. > > > > >

RE: Problem iterating over diamond (while)

2004-09-28 Thread Bob Showalter
Edward Wijaya wrote: > Thanks a lot for your reply Bob. > but can you be more specific: > > > You need to either close and reopen the file, or > > rewind the file using seek() before you can re-read the data. > > What I mean is: for ( ...blah... ) { seek(INFILE, 0, 0); # <--- re

Re: Problem iterating over diamond (while)

2004-09-28 Thread Edward Wijaya
Thanks a lot for your reply Bob. but can you be more specific: You need to either close and reopen the file, or rewind the file using seek() before you can re-read the data. I tried seek() following "perldoc" like this: __BEGIN__ for ( my $t = 1 ; $t <= $trial ; $t++ ) { for ( $curpo

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gabor Urban
On Tue, 2004-09-28 at 13:20, Gavin Henry wrote: > I really like Perl, but lately everywhere I seem to go and talk to say I > shouldn't be learning Perl as it's old and Python is better. THese days Python is gaining support in the field. But I do think it is mainly hype. I do think it is not

RE: Problem iterating over diamond (while)

2004-09-28 Thread Bob Showalter
Edward Wijaya wrote: > Hi, > > Suppose I have a data file that contain these lines: > output1 > output2 > > when I run the code below > with: perl mycode.pl -f datafile > it gives: > > Trial 1 > output1 > output2 > Trial 2 > > > instead of: > > Trial 1 > output1 > output2 > Trial 2 > output1

Re: Problem iterating over diamond (while)

2004-09-28 Thread Gavin Henry
Gavin Henry said: >> Can we actually loop over the 'while diamond'? >> Please kindly advice how can I overcome this problem. > > I don't know if I'm skilled enough to answer this yet, but shouldn't you > be using: Nope, sorry. It helps if I *actually* read the rest of your e-mail. Sorry. > > my

Re: Problem iterating over diamond (while)

2004-09-28 Thread Gavin Henry
> Can we actually loop over the 'while diamond'? > Please kindly advice how can I overcome this problem. I don't know if I'm skilled enough to answer this yet, but shouldn't you be using: my @myarray = ; foreach (@myarray) { do stuff } > Thanks so much for your time. > > Regards, > Edward WIJA

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
David Garamond said: > Gavin Henry wrote: >> I really like Perl, but lately everywhere I seem to go and talk to say I >> shouldn't be learning Perl as it's old and Python is better. > > My Good Lord, where have you been? Python is _already_ old news. Ruby, > baby! :-) > >> I am on the right path? >

Problem iterating over diamond (while)

2004-09-28 Thread Edward Wijaya
Hi, Suppose I have a data file that contain these lines: output1 output2 when I run the code below with: perl mycode.pl -f datafile it gives: Trial 1 output1 output2 Trial 2 instead of: Trial 1 output1 output2 Trial 2 output1 output2 Can we actually loop over the 'while diamond'? Please kindly advi

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
Wiggins d Anconia said: >> I really like Perl, but lately everywhere I seem to go and talk to say I >> shouldn't be learning Perl as it's old and Python is better. >> > > I'm impressed, come to the Midwest in the US, around here they have only > heard of M$ and Cobol. Ironically, Python is showing

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread David Garamond
Gavin Henry wrote: I really like Perl, but lately everywhere I seem to go and talk to say I shouldn't be learning Perl as it's old and Python is better. My Good Lord, where have you been? Python is _already_ old news. Ruby, baby! :-) I am on the right path? The right path is probably to learn the

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Wiggins d Anconia
> I really like Perl, but lately everywhere I seem to go and talk to say I > shouldn't be learning Perl as it's old and Python is better. > I'm impressed, come to the Midwest in the US, around here they have only heard of M$ and Cobol. Ironically, Python is showing its age, just look at Ruby. Of

Re: Is there a module to manipulate NTFS permissions?

2004-09-28 Thread S.A. Birl
On Sep 27, John ([EMAIL PROTECTED]) typed: John: > Then add the other users and groups: John: > John: > cacls /t /g SYSTEM:f John: > cacls /t /g Administrator:f John: > cacls /t /g Administrators:f John: John: err, cacls /t /p SYSTEM:F John: John: First param to calcls is file/directory.

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
Paul Kraus said: >> I really like Perl, but lately everywhere I seem to go and talk to say I >> shouldn't be learning Perl as it's old and Python is better. > Lets pretend we are mechanics we have this one tool that was passed on > down from generation to generation. It is our very very very favori

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
JupiterHost.Net said: > > > Gavin Henry wrote: >> I really like Perl, but lately everywhere I seem to go and talk to say I > > Me too :) > >> shouldn't be learning Perl as it's old and Python is better. > > Python is different not necessarily better. > >> Since starting to learn Perl though, every

Re: Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Errin Larsen
Hi Edward! On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya <[EMAIL PROTECTED]> wrote: > Hi, > Why my code below fail to open and > print the file contents > > when I do: > > perl mycode.pl -f filename > > Regards, > Edward WIJAYA > SINGAPORE > > __BEGIN__ > use strict; > use warnings; Go

Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread JupiterHost.Net
Gavin Henry wrote: I really like Perl, but lately everywhere I seem to go and talk to say I Me too :) shouldn't be learning Perl as it's old and Python is better. Python is different not necessarily better. Since starting to learn Perl though, every other language I started to learn/t, C, PHP etc.

Re: server is numb?

2004-09-28 Thread Jeff 'japhy' Pinyan
On Sep 28, Christian Stalp said: >$socket-> send ( $data , $flags ) or die "could not send!\n"; To send data to the socket, just print() to it: print $socket "$data\n"; -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who f

Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-28 Thread Gavin Henry
I really like Perl, but lately everywhere I seem to go and talk to say I shouldn't be learning Perl as it's old and Python is better. Since starting to learn Perl though, every other language I started to learn/t, C, PHP etc. seem to make more sense now, as Perl has cleared things up. When I look

Opening file($ARGV) with Getopt - failing

2004-09-28 Thread Edward Wijaya
Hi, Why my code below fail to open and print the file contents when I do: perl mycode.pl -f filename Regards, Edward WIJAYA SINGAPORE __BEGIN__ use strict; use warnings; use Getopt::Std; use vars qw($f); getopts('f:'); my $f = $ARGV[0]; open ( INFILE, '<', $f) or die "$0 : failed to open i

directory copy command

2004-09-28 Thread Urs Wagner
Hello Is there a similar perl command for directory copy like the File:Copy? I thinks this one does not work for directories. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: server is numb?

2004-09-28 Thread Christian Stalp
Okay okay, it shold call: while ( $client = $server->accept () ) { print "$client \n"; } close ( $server ); __END_ And so it works, but not as I need. The output is IO::Socket::INET=GLOB(0x81848d0) Gruss Christian -- Christian Stalp Institut für Medizinische Biometrie, Epidemiologie und

Re: Perl editor you preffer

2004-09-28 Thread Gabor Urban
On Mon, 2004-09-27 at 07:45, Nicolay A. Vasiliev wrote: > Which perl editor do you use? Maybe it will match for me too? > > Thanks in advance and sorry my poor English. Hi, If I am forced to use WinDoz I prefer gvim or Xemacs. Both are very powerfull editors. > -- > Best regards, > Nicolay Va

server is numb?

2004-09-28 Thread Christian Stalp
Hello together, I just tryed to make a simple Socket-Connection with a client and a server which are connected with each other over localhost. the server: #!/usr/bin/perl use IO::Socket; use strict; my $server_port = 3434; my $server; my $client; my $in_line; $server = IO::Socket::INET-> new (