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/
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
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/
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
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
binuRX8OPobbD.bin
Description: application/pgp-encrypted
msg.asc
Description: Binary data
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
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