Getopt::Long

2010-06-17 Thread Unknown User
I have the following code: GetOptions( n|name=s = \$name, a|age=i = \$age, s|sex=s = \$sex, ) || die Bad options\n;; What i expected this code to do is to die if a bad option was given, say -s without an arguement, as in ./myprog -n name -s -a 20 However, it does not do

Re: Getopt::Long

2010-06-17 Thread Chas. Owens
On Thu, Jun 17, 2010 at 02:36, Unknown User knowsuperunkn...@gmail.com wrote: I have the following code: GetOptions(        n|name=s =   \$name,        a|age=i = \$age,        s|sex=s = \$sex, ) || die Bad options\n;; What i expected this code to do is to die if a bad option was given,

Re: Getopt::Long

2010-06-17 Thread Shawn H Corey
On 10-06-17 02:36 AM, Unknown User wrote: I have the following code: GetOptions( n|name=s = \$name, a|age=i = \$age, s|sex=s = \$sex, ) || die Bad options\n;; GetOptions( name=s =\$name, age=i = \$age, sex=s = \$sex, ) || die Bad

Re: Getopt::Long

2010-06-17 Thread Chas. Owens
On Thu, Jun 17, 2010 at 07:50, Shawn H Corey shawnhco...@gmail.com wrote: On 10-06-17 02:36 AM, Unknown User wrote: I have the following code: GetOptions(        n|name=s =   \$name,        a|age=i =  \$age,        s|sex=s =  \$sex, ) || die Bad options\n;; GetOptions(        name=s =  

Re: Getopt::Long

2010-06-17 Thread Robert Wohlfarth
On Thu, Jun 17, 2010 at 6:50 AM, Shawn H Corey shawnhco...@gmail.comwrote: On 10-06-17 02:36 AM, Unknown User wrote: I have the following code: GetOptions( n|name=s = \$name, a|age=i = \$age, s|sex=s = \$sex, ) || die Bad options\n;; But they are complete.

NEWBIE: How to write to a file

2010-06-17 Thread Atropo
Hi all,don't know almost nothing about perl but I'm RTFM. Dimitre Radoulov gave a perl script to get and delete via ftp some files. now i want generate a log file with those file names. I only added the lines starting in uppercase perl -MNet::FTP -le' ( $host, $user, $pass, $dir ) =

Re: Edit large data file

2010-06-17 Thread mrwawa
On Jun 16, 7:14 am, rwci...@alum.calberkeley.org (Robert Citek) wrote: On Tue, Jun 15, 2010 at 1:50 PM, mrwawa wade.w...@gmail.com wrote: Is this possible, and if so how can I do it? Can you give an example? For example, using colons instead of tabs, if the input looks like this: A:BC:D

Modifying the passwd file

2010-06-17 Thread little_help
Is there a way to change all entries for a current username with a new username? I have two files (A and B for the sake of argument). File A has all the current names in the passwd map and file B has the new names. For example File AFile B FooFoo123 Bar Bar1234 I need to

Re: NEWBIE: How to write to a file

2010-06-17 Thread Uri Guttman
A == Atropo lxvasq...@gmail.com writes: A Hi all,don't know almost nothing about perl but I'm RTFM. A Dimitre Radoulov gave a perl script to get and delete via ftp some A files. now i want generate a log file with those file names. A I only added the lines starting in uppercase

Re: Modifying the passwd file

2010-06-17 Thread Shlomi Fish
On Wednesday 16 Jun 2010 23:29:31 little_help wrote: Is there a way to change all entries for a current username with a new username? I have two files (A and B for the sake of argument). File A has all the current names in the passwd map and file B has the new names. For example File A

collectd application

2010-06-17 Thread Kaushal Shriyan
Hi, For example I do wget -O file.png http://collectd.example.com/collectd/cgi-bin/collection.cgi?action=show_plugin;host=testdb;timespan=day;plugin=mysql; for a single host testdb and plugin mysql I do /usr/bin/mime-construct --header 'Sender: mor_...@test.com' --header 'From:

Re: Modifying the passwd file

2010-06-17 Thread Jim Gibson
On 6/16/10 Wed Jun 16, 2010 1:29 PM, little_help littlehelph...@gmail.com scribbled: Is there a way to change all entries for a current username with a new username? I have two files (A and B for the sake of argument). File A has all the current names in the passwd map and file B has the

Re: collectd application

2010-06-17 Thread Shlomi Fish
On Thursday 17 Jun 2010 21:55:17 Kaushal Shriyan wrote: Hi, For example I do wget -O file.png http://collectd.example.com/collectd/cgi-bin/collection.cgi?action=show_pl ugin;host=testdb;timespan=day;plugin=mysql for a single host testdb and plugin mysql I do /usr/bin/mime-construct