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
> 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
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
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
> -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:
>
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
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;
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
##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
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
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;
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
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
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
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
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
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/"
> $ 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
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
> 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/
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
21 matches
Mail list logo