How to get the values

2007-06-19 Thread Nath, Alok (STSD)
Hi, I have a file from which I have to pick a line like this and get the values of Par, Default and RootOnly. Par=som Default=yes RootOnly=no Shared=force I am trying something like below.But the code is becoming long. Anything simplistic will help. Than

Re: Simple Encryption - what function/module could I use?

2007-06-19 Thread rcook
> What function/module (I prefer built in functions...) is there that I > can use to do some simple/basic reversable (opposed to crypt()'s one > way) encryption? > I want to be able to encrypt/decrypt a textfile. Did you go to http://search.cpan.org/ and search on 'encrypt' ? There are lots of t

Re: bug in perl or in my head ;-)

2007-06-19 Thread Dr.Ruud
Martin Barth schreef: > [use encoding] > If I understand you right, following code should allways create a utf8 > encoded file. No, "use encoding" is about the encoding of your script, not about file IO. encoding - allows you to write your script in non-ascii or non-utf8 > Since my inputfile

Simple Encryption - what function/module could I use?

2007-06-19 Thread yitzle
What function/module (I prefer built in functions...) is there that I can use to do some simple/basic reversable (opposed to crypt()'s one way) encryption? I want to be able to encrypt/decrypt a textfile. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: Inter-thread communications

2007-06-19 Thread Bob McConnell
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of zentara > Sent: Tuesday, June 19, 2007 2:55 PM > To: beginners@perl.org > Subject: Re: Inter-thread communications > > On Mon, 18 Jun 2007 12:58:31 -0400, [EMAIL PROTECTED] ("Bob McConnell") > wrote: >

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, > Ahh, very good. Thanks Rob (and Martin from earlier). I think I > understand now. It calls the wanted sub routine, populates the @files > array for each iteration. Then when that completes the contents of the > array @files are printed. . .? > > Matt > you're right, Matt. the name

Re: find2perl output to array

2007-06-19 Thread Matt
Rob Dixon wrote: Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Martin Barth wrote: Hi Matt, I did that, and then at the bottom of the script I tried looping through just to verify that @files was populated - no dice. (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, name; What have I do

Re: Command line usage

2007-06-19 Thread Fetter
##I have files read into $output_dir if ($output_dir =~ "_Modified") { $allfile2 = $output_dir; #set allfile2 equal to output_dir to keep output_dir untouched $_ = $allfile2; #set input string equal to allfile2 for replacement s/_Mo

Re: find2perl output to array

2007-06-19 Thread Rob Dixon
Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi Matt, > I did that, and then at the bottom of the script I tried looping through > just to verify that @files was populated - no dice. > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, name; > What have I done wrong? push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you have all f

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, change following line: > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && print("$name\n"); to > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, $name; at the end you have all files in the @files ar

Re: bug in perl or in my head ;-)

2007-06-19 Thread Martin Barth
Hi jay, > You haven't told us what Perl thinks the encoding of the first file > is. how can I do that? > file is a system command that makes use of number of different > approaches to determine file type including, on some systems, I think > it even makes use of metadata. Actually examinin

Re: perl sort query

2007-06-19 Thread Rob Dixon
pauld wrote: John W. Krahn wrote: It sorts fine here: $ perl -le' print for @x = qw/200610011733 200610012057 200610011029 200610010928 200610011220/, ""; print for sort @x; ' 200610011733 200610012057 200610011029 200610010928 200610011220 200610010928 200610011029 200610011220 2006100117

find2perl output to array

2007-06-19 Thread Matt
Using the find2perl utility how would I send the output to an array? By default it will print out the results like: /home/ftpuser/aef/flexvault/EOM033107/DATAAG.zip /home/ftpuser/aef/flexvault/EOM033107/DATAHZ.zip I'd like those lines to be put into an array instead of printed to stdout. I

Re: bug in perl or in my head ;-)

2007-06-19 Thread Jay Savage
On 6/18/07, Martin Barth <[EMAIL PROTECTED]> wrote: Hi there, have a look at: % cat datei eine test datei die "u "a "o % file datei datei: ASCII text % cp datei datei.bk % perl -wpi -e 'use encoding "utf8"; s/"a/รค/' datei % file datei datei: ISO-8859 text % perl -wp -e 'use encoding "utf8"; s/"

Re: perl sort query

2007-06-19 Thread pauld
> $ perl -le' > print for @x = qw/200610011733 200610012057 200610011029 200610010928 > 200610011220/, ""; > > print for sort @x; > ' > 200610011733 > 200610012057 > 200610011029 > 200610010928 > 200610011220 > the time is the last 4 digits (hhmm) so the first is 17:33 then 20:57 then 10:29 then

charset/base64 encoding/encode.

2007-06-19 Thread Tom Allison
Still futzing around with email and character sets. Under Encode and perluniintro there's mention of octet \x{..} (255 chars up to \xff string some internal representation code point \x{...} 1, 2 or more bytes of data But I'm not sure about the order of things. So I'll try

Re: bug in perl or in my head ;-)

2007-06-19 Thread Martin Barth
> Probably. It's worth a bug report, at least. I sent it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: learning perl llama if I have never programmed

2007-06-19 Thread gavino
On May 23, 8:32 am, Paul Lalli <[EMAIL PROTECTED]> wrote: > On May 22, 5:40 pm, gavino <[EMAIL PROTECTED]> wrote: > > > Is this book 4th ed for me if I have never programmed b4? > > I would not recommend it, no. Here's a direct copy from the Preface > of the book: > == > Though you don