Re: removing duplicates

2008-04-29 Thread Chas. Owens
On Tue, Apr 29, 2008 at 8:06 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote: snip > perl -n'${$_}||=print' snip That is nasty. If I am reading that correctly you are using a symbolic reference to create variables with the name of the line. I can't remember, does Perl have a limit on the size of

Re: perl source code encryption

2008-04-29 Thread John W. Krahn
Anirban Adhikary wrote: Dear list Hello, I want to encrypt my perl source code. I am using some modules in my code. Among them some are downloaded from CPAn as well as some are written by my -self. So how to encrypt all perl codes includes the modules. perldoc -q "How can I hide the source

Re: perl source code encryption

2008-04-29 Thread Chas. Owens
On Wed, Apr 30, 2008 at 1:52 AM, Anirban Adhikary <[EMAIL PROTECTED]> wrote: > I Have gone through google and CPAN and finds some information over there . > can it be helpful for completion my purpose. U people please suggest. > > If my program name is rundbload.pl > > perl -MO=Bytecode,-H,-b,-k

Re: Formatting output after search and replace

2008-04-29 Thread Chas. Owens
On Tue, Apr 29, 2008 at 6:06 PM, melody <[EMAIL PROTECTED]> wrote: snip > #!/usr/bin/perl > use warnings; > use strict; snip Good, keep this up snip > my @array; > my @replacearray; snip Try to declare your variables where you initialize them. snip > open FHR,'<',"repl.txt"; > open OUT,'

Re: perl source code encryption

2008-04-29 Thread Anirban Adhikary
I Have gone through google and CPAN and finds some information over there . can it be helpful for completion my purpose. U people please suggest. If my program name is rundbload.pl perl -MO=Bytecode,-H,-b,-k,orundbload rundbload.pl http://search.cpan.org/~nwclark/perl-5.8.8/ext/B/B/Bytecode.pm

Re: perl source code encryption

2008-04-29 Thread Chas. Owens
On Wed, Apr 30, 2008 at 1:11 AM, Anirban Adhikary <[EMAIL PROTECTED]> wrote: > Dear list > I want to encrypt my perl source code. I am using some modules in my code. > Among them some are downloaded from CPAn as well as some are written by my > -self. So how to encrypt all perl codes includes t

perl source code encryption

2008-04-29 Thread Anirban Adhikary
Dear list I want to encrypt my perl source code. I am using some modules in my code. Among them some are downloaded from CPAn as well as some are written by my -self. So how to encrypt all perl codes includes the modules. Thanks&Regards in advance Anirban Adhikary

Re: removing duplicates

2008-04-29 Thread John W. Krahn
Jenda Krynicky wrote: From: "John W. Krahn" <[EMAIL PROTECTED]> Rob Dixon wrote: obdulio santana wrote: May be this helps perl -lne "print if ++$D{$_} == 1" address.txt You may prefer the cuteness of perl -lne "print unless $D{$_}++" address.txt Or the shortness of: perl -ne'$D{$_

Formatting output after search and replace

2008-04-29 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

Re: perl -MCPAN -e shell failed

2008-04-29 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: after freshelly installing fedora 9(which is preview version) and which has perl 5.10 fails command line perl module install. Granted that it means I don't have cpan.pm module, how come it didn't come w/ it by default or did I do something wrong? also, s

Re: removing duplicates

2008-04-29 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Rob Dixon wrote: > > obdulio santana wrote: > >> May be this helps > >> > >> perl -lne "print if ++$D{$_} == 1" address.txt > > > > You may prefer the cuteness of > > > > perl -lne "print unless $D{$_}++" address.txt > > Or the shortness of: > >

Re: removing duplicates

2008-04-29 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Rob Dixon wrote: > > obdulio santana wrote: > >> May be this helps > >> > >> perl -lne "print if ++$D{$_} == 1" address.txt > > > > You may prefer the cuteness of > > > > perl -lne "print unless $D{$_}++" address.txt > > Or the shortness of: > >

Re: removing duplicates

2008-04-29 Thread John W. Krahn
Rob Dixon wrote: obdulio santana wrote: May be this helps perl -lne "print if ++$D{$_} == 1" address.txt You may prefer the cuteness of perl -lne "print unless $D{$_}++" address.txt Or the shortness of: perl -ne'$D{$_}++||print' address.txt John -- Perl isn't a toolbox, but a sma

Re: removing duplicates

2008-04-29 Thread Rob Dixon
Rob Dixon wrote: > obdulio santana wrote: >> May be this helps >> >> perl -lne "print if ++$D{$_} == 1" address.txt > > You may prefer the cuteness of > > perl -lne "print unless $D{$_}++" address.txt My apologies. That requires single quotes: perl -lne 'print unless $D{$_}++' address.txt

Re: removing duplicates

2008-04-29 Thread Rob Dixon
obdulio santana wrote: > May be this helps > > perl -lne "print if ++$D{$_} == 1" address.txt You may prefer the cuteness of perl -lne "print unless $D{$_}++" address.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl -MCPAN -e shell failed

2008-04-29 Thread Rob Dixon
Richard Lee wrote: > after freshelly installing fedora 9(which is preview version) and which > has perl 5.10 fails command line perl module install. > Granted that it means I don't have cpan.pm module, how come it didn't > come w/ it by default or did I do something wrong? > > also, searching fo

Re: Getting error - Global signal requires explicit package name

2008-04-29 Thread Gunnar Hjalmarsson
hotkitty wrote: I've fixed the issue by reinstalling PERL. However, I am now getting the error message saying: Use of uninitialized value in pattern match (m//) at cctest.pl line 26. (Line 26 is "if ($tag = "a href" && " I already addressed that issue. http://www.mail-archive.com/beginners%4

Re: hash return from a sub

2008-04-29 Thread Flyzone
On 29 Apr, 01:03, [EMAIL PROTECTED] (Andrew Curry) wrote: > Ill make a guess it's a scope issue Yep, found the error > my(%myhash,$var1,$var2); I forgot to declare the 'myhash' into the sub. Done that now is working. :-) Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Getting error - Global signal requires explicit package name

2008-04-29 Thread hotkitty
On Apr 28, 8:43 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > hotkitty wrote: > > I'm trying to extract links from a website but get the following > > error: > > > Global symbol "%Config" requires explicit package name at C:/Perl/lib/ > > Errno.pm l > > ine 11. > > Global symbol "%Config" requires exp

trouble with cgi::session- redirects and getting params

2008-04-29 Thread nflacco
I'm trying to set up a simple web page with login and registration system before I try more complicated stuff. I'm running into a problem where I redirect to a script, try to pull a parameter off of the url and do something with it ( in this case, a session id that needs to be removed from the dat

Re: removing duplicates

2008-04-29 Thread John W. Krahn
sivasakthi wrote: On Tue, 2008-02-05 at 14:40 -0500, obdulio santana wrote: May be this helps perl -lne "print if ++$D{$_} == 1" address.txt I have tried the above command , but it shows the following error, Can't modify single ref constructor in preincrement (++) at -e line 1, near "} =="

Re: Getting error - Global signal requires explicit package name

2008-04-29 Thread hotkitty
Thanks for the help. It was an install issue. I reinstalled Perl and now script works fine. Thanks again for the responses! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: removing duplicates

2008-04-29 Thread sivasakthi
On Tue, 2008-02-05 at 14:40 -0500, obdulio santana wrote: > May be this helps > > perl -lne "print if ++$D{$_} == 1" address.txt > > regards > > > I have tried the above command , but it shows the following error, Can't modify single ref constructor in preincrement (++) at -e line 1, near