Re: CPAN not working, or is it?

2019-03-12 Thread Magnus Woldrich
le globally and not only for a specific user, a better place would be e.g /usr/lib/perl5/* -- Magnus Woldrich japh@freenode http://japh.se https://github.com/trapd00r -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Change relative path to absolute path

2012-05-11 Thread Magnus Woldrich
On May 11, Zapp (Zapp) wrote: Does anyone has a better idea? #!/usr/bin/perl use strict; use warnings FATAL => 'all'; use Cwd qw(getcwd); my $cwd = getcwd(); print map { -e "$cwd/$_" ? "$cwd/$_\n" : "$_\n" } @ARGV; Or use rel2abs in the

Re: Maintain Packages

2011-09-21 Thread Magnus Woldrich
lps a lot. Idling in one of the Perl irc channels (freenode, irc.perl.org) might also be a good idea. Cheers, -- │ Magnus Woldrich │ m...@japh.se │ http://japh.se -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: File test failed!

2011-09-16 Thread Magnus Woldrich
On 2011-09-16 17:53, y...@eisoo.com wrote: I want to test if a file exists or it is a link or not You test for a regular file with -f. You test for existance with -e. You test for symbolic links with -l. See perldoc -f -x for more information. -- │ Magnus Woldrich │ m...@japh.se │ http

Re: practical perl guides

2011-05-28 Thread Magnus Woldrich
I am looking for a practical guide something that says here is a example It sounds like what you want is the Perl Cookbook [0]. [0]: http://oreilly.com/catalog/9781565922433/ -- │ Magnus Woldrich │ m...@japh.se │ http://japh.se -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Programmatically check for syntax errors without compiling the code

2011-03-29 Thread Magnus Woldrich
binuRX8OPobbD.bin Description: application/pgp-encrypted msg.asc Description: Binary data

Re: help with array elements

2011-03-12 Thread magnus
On 2011-03-12 13:17, ashwin ts wrote: Hi, Hello, I have an array which has few elements like '1,2,3,4,2,3,1,2,1,1,1,4,6,7' i need to know how many times each element has occurred in the same array. for example 1-5 times 2-3 times... Use a hash. #!/usr/bin/perl use

Re: smart match question

2010-11-27 Thread magnus
my @divisors = (1, 2); say "It's divisible by 2!" if @divisors ~~ 2; How do you think that would work? From perldoc perlop: Binary "~~" does a smart match between its arguments. Smart matching is described in "Smart matching in detail" in perlsyn. my @divisors = (1 .. 6); for