Re: Shortest One-liner to Rename Files

2005-11-10 Thread John W. Krahn
Wijaya Edward wrote: > Hi John, > > From: "John W. Krahn" <[EMAIL PROTECTED]> > >>mmv '*.txt.out' '#1.out' > > you mean just: > > mv '*.txt.out' '#1.out' > > right ? and not "mmv" No, I meant mmv. $ man mmv MMV(1) NAME mmv - move/copy/append/link multiple files by wildcard pattern

Re: Shortest One-liner to Rename Files

2005-11-10 Thread John W. Krahn
Wijaya Edward wrote: > Hi all, Hello, > I have a snippet that rename files from: > "sth.txt.out" into > "sth.out" > > Now I am really curious how can I make this > oneliner "even shorter": mmv '*.txt.out' '#1.out' > $ perl -e ' > for(glob ("*.txt.out")){ for ( <*.txt.out> ) { > $out = $_;

Shortest One-liner to Rename Files

2005-11-10 Thread Wijaya Edward
Hi all, I have a snippet that rename files from: "sth.txt.out" into "sth.out" Now I am really curious how can I make this oneliner "even shorter": $ perl -e ' for(glob ("*.txt.out")){ $out = $_; $out =~ s/\.txt(\.out)/\.out/; rename ($_,$out); }' Hope to hear from you again. -- Regards, Ed

Re: hashrefs inside arrays

2005-11-10 Thread Michael David
From: "Jeremy Kister" <[EMAIL PROTECTED]> To: Sent: Friday, November 11, 2005 9:40 AM Subject: hashrefs inside arrays I'm trying to find if an array's elements are simple strings or if they are hashrefs. my @a = ('string1','string2','string3'); my @a = ( { STRING => 'string1', ID => 1 },

hashrefs inside arrays

2005-11-10 Thread Jeremy Kister
I'm trying to find if an array's elements are simple strings or if they are hashrefs. my @a = ('string1','string2','string3'); my @a = ( { STRING => 'string1', ID => 1 }, { STRING => 'string2', ID => 2 }, ); my $aref = [EMAIL PROTECTED]; # this value is passed to a sub i've tried: if($a

RE: Windows XP Pro vs Windows 2000

2005-11-10 Thread Bakken, Luke
Walter A Poor Jr wrote: > We have been using perl (ActiveState 5.8.6) on Windows 2000 PCs for a > year > > or so. Recently the PC techs replaced W 2000 with Windows XP Pro on > one of my PCs. Most perl functionality still works, but one key > operation in our main program now fails. > > The pr

Help: Net::SFTP can't find my file..?

2005-11-10 Thread RICHARD FERNANDEZ
I know the answer must be right in front of me, but I just don't see it... I wrote a script that looks for files and then sends them to a remote SFTP server: #!/usr/bin/perl -w use strict; use Net::SFTP; use Logit; # this is a homegrown function that takes a filename and a line

Windows XP Pro vs Windows 2000

2005-11-10 Thread Walter A Poor Jr
We have been using perl (ActiveState 5.8.6) on Windows 2000 PCs for a year or so. Recently the PC techs replaced W 2000 with Windows XP Pro on one of my PCs. Most perl functionality still works, but one key operation in our main program now fails. The program prompts the user for the name of

Re: System call for openssl

2005-11-10 Thread Pete Emerson
If you don't specify -out the openssl command (I think, untested) will spit the results to STDOUT, in which case you could do this: $results = `openssl smime smime -sign -outform der -nodetach -signer $certificate -in $encoded`; and then you probably want to chomp $results, or parse them in

System call for openssl

2005-11-10 Thread Ward.P.Fontenot
If I have: $certificate = "/home/oracle/certs/oracle.pem"; $encoded = encode_base64($sha1data); Can I do something like this: system('openssl smime smime -sign -outform der -nodetach -out $signed -signer $certificate -in $encoded'); To get a value for $signed? Paul Fontenot WFS - CAST Operation

RE: What is $" (can´t find it in the Camelbook)

2005-11-10 Thread Dave Day
>From perldoc.perl.org/perlvar.html: $" This is like $, except that it applies to array and slice values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic: obvious, I think.) -Original Message- From: Shawn Corey [mailto:[EMAIL PROTEC

Re: "system" command help

2005-11-10 Thread Shawn Corey
Marilyn Sander wrote: On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer.

Re: Is it possible with RegEx

2005-11-10 Thread Bob Showalter
Gilles wrote: Hi, I try do to a < simple > thing : Knowing If a string like "13" exist in a string like "123" Or if "37" exist in "12356789" I tried many solutions, but never found one good so I try to do it with loops which more difficult but not impossible I'd like to know if with RegExp

Re: Is it possible with RegEx

2005-11-10 Thread Shawn Corey
Gilles wrote: Hi, I try do to a < simple > thing : Knowing If a string like "13" exist in a string like "123" Or if "37" exist in "12356789" I tried many solutions, but never found one good so I try to do it with loops which more difficult but not impossible I'd like to know if with RegExp

Re: What is $" (can´t find it in the Camelbook)

2005-11-10 Thread Shawn Corey
Elie De Brauwer wrote: Angerstein wrote: Hello there, I found the $" Scalar in some examples but I can´t figure out what they are for. Could someone tell me what $" is? perldoc perlvar $LIST_SEPARATOR $" This is like $, except that it applies to array and slice val- ues i

Re: What is $" (can´t find it in the Camelbook)

2005-11-10 Thread Elie De Brauwer
Angerstein wrote: Hello there, I found the $" Scalar in some examples but I can´t figure out what they are for. Could someone tell me what $" is? perldoc perlvar $LIST_SEPARATOR $" This is like $, except that it applies to array and slice val- ues interpolated into a double-q

What is $" (can´t find it in the Camelbook)

2005-11-10 Thread Angerstein
Hello there, I found the $" Scalar in some examples but I can´t figure out what they are for. Could someone tell me what $" is? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]