for example, says() is alias to
> print().
This is not possible. Though it is with some core functions.
See https://perldoc.perl.org/CORE.html for details.
--
Paul Johnson - p...@pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional com
me = shift;
> >$name ||= 'Anonymous Person';
>
> Which is usually written as:
>
>sub hello {
>my $name = shift || 'Anonymous Person';
Or, nowadays, and if your perl version(s) support it, as:
sub hello ($name = "Anonymous Person&
On Mon, Aug 18, 2014 at 06:07:59AM -0700, John SJ Anderson wrote:
On Mon, Aug 18, 2014 at 1:38 AM, Paul Johnson wrote:
> On Mon, Aug 18, 2014 at 04:17:53PM +0800, Ken Peng wrote:
>> which one is the better way to return the list content? And if the
>> method is an instance metho
2018, 13:39 Peng Yu wrote:
>
> > Hi,
> >
> > For the following two expressions, are they of the same speed or one
> > of them is faster?
> >
> > `$#array` vs `scalar @array`
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginner
On Fri, Aug 04, 2017 at 05:45:08PM +0200, hw wrote:
> Paul Johnson wrote:
> > On Thu, Aug 03, 2017 at 08:44:45PM +0200, hw wrote:
> > >
> > > Hi,
> > >
> > > suppose I have a class FOO and a class BAR. The parent of BAR is FOO.
> > >
&g
ally called
traits in other languages. You can use roles within Moose or Moo, or by
using other CPAN modules. You can read more about roles/traits at
https://en.wikipedia.org/wiki/Trait_(computer_programming)
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beg
ge, you will have an
unsatisfying experience. The trick is to work with the language. Then
programming becomes productive and enjoyable, the sun shines, ponies
frolic through meadows, and unicorns graze contentedly beneath rainbows.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscri
ule which will
probably do what you want: PPI. See https://metacpan.org/pod/PPI
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
But they're all fast enough. Or none of them are. So choose the
solution which is the clearest.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Tue, Mar 28, 2017 at 12:20:29AM +0300, Shlomi Fish wrote:
> Hi Paul!
>
> On Mon, 27 Mar 2017 22:21:06 +0200
> Paul Johnson wrote:
>
> > On Mon, Mar 27, 2017 at 04:04:22PM +0200, Luca Ferrari wrote:
> > > Hi all,
> > > I've to run a very old
launch the application with a file name, do a couple
> of menu interactions and exit, then do it again for a hundred or so
> files.
> Is there any kind of "app-mechanize" similar to www::mechanize?
Nothing to do with perl, but you could try xdotool
http://www.semicom
ears). As you note, the correct way to get
this behaviour nowadays is to use the "state" keyword.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
f
the problems go away.
> Also, this answer on StackOverflow by tchrist (Tom Christiansen, who I
> would say knows the most about the intersection of Perl and Unicode)
> is a good resource: http://stackoverflow.com/a/6163129/78259
Quite. And utf8::all tries to encapsulate as much of th
sts/perl5-porters/2008-08/msg00390.html
You'll notice that I disagree with Uri. You should follow the coding
guidelines of any existing project you are working on, and make up your
own mind about what to do when you get to decide the guidelines.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Mon, Jan 25, 2016 at 12:24:04AM +0100, lee wrote:
> Paul Johnson writes:
>
> > On Sun, Jan 24, 2016 at 05:44:14PM +0200, Shlomi Fish wrote:
> >> Hi lee,
> >>
> >> On Sun, 24 Jan 2016 13:11:37 +0100
> >> lee wrote:
> >>
> >&g
On Sun, Jan 24, 2016 at 05:44:14PM +0200, Shlomi Fish wrote:
> Hi lee,
>
> On Sun, 24 Jan 2016 13:11:37 +0100
> lee wrote:
>
> > Paul Johnson writes:
> > >
> > > In scalar context the comma operator evaluates its left-hand side,
> > >
you're working far too hard!
my @array = qw(11 2 3 4 55 4 3 2);
my %seen;
my @unique = grep !$seen{$_}++, @array;
This method is mentioned in the Perl Cookbook that was linked to earlier
in the thread. But I doubt that link should have been online, so get
hold of a legal copy if this is
efore it is brought out of experimental status.
But there might be larger changes that wouldn't be completely backwards
compatible. Or the feature may be completely scrapped. That's the risk
you take with experimental features. But there is certainly a will to
make this feature stic
inside
one of your .pl files, or make a new one especially for that purpose.
If you carry on down this path though, you will soon end up reinventing
Perl's testing system. Give serious thought to whether moving to a
standard test layout now wouldn't be a bad use of your time.
> &g
program doesn't require any input, you will need to
run it multiple times with varying input to get proper coverage
information.
And the way to do this is also in the synopsis that Shlomi pointed you
to.
Coverage without tests is hard though.
--
Paul Johnson - p...@pjcj.net
http:/
t; etc.
Or, if you can't be bothered writing all that code:
$ perl -E 'push @{$pos{$_}}, $i++ for map split, ; say "$_: @{$pos{$_}}"
for @ARGV' bccd sdcch < data
bccd: 8 98 188 278 368 458 548 638 728 818 908 998 1088 1178 1268 1358
sdcch: 81 171 261 351 441 53
ror. So something is still going on somewhere
> else.
That may well be, but the semi-colon is an error, and the only one we
can see in the code you have posted.
$ perl -ce 'find ( sub {}, $tdir; )'
syntax error at -e line 1, near "$tdir;"
-e had compilation errors
$ perl -c
his at every match.
>
> ignoring bad Prompt argument "'/>>/'": missing opening delimiter of match
> operator at linux_diagnostics.pl line 189
Guessing:
You are using Net::Telnet and your prompt should be "/>>/" rather than
"'/>>/'&quo
is done in
the perl core.
You would normally take the substr from the original string before
splitting it, unless you wanted to taint $foo even if its source wasn't
tainted.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For
at is the case then you need to add the /s flag so that . will also
match a newline.
And for style, you can pull out the duplicated parts of the regex and
use another delimiter to avoid Leaning Toothpick Syndrome.
Putting it together you get:
my $start = qr!mailto:|ldap:///!;
while ($str =~ /$
On Tue, Sep 16, 2014 at 02:43:28PM -0500, Andy Bach wrote:
> On Tue, Sep 16, 2014 at 1:45 PM, Paul Johnson wrote:
>
> > The comma operator evaluates its LHS, throws it away, evaluates its RHS
> > and returns that. The comma operator is left associative (see perlop).
> &
3 :)
See also perldoc -q 'difference between a list and an array'
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
scalar context.
In scalar context the comma operator evaluates its left-hand side,
throws it away and returns the right-hand side.
This means that the value of (1, 2, 3) in scalar context is 3, and this
is what gets assigned to $list.
What is not happening at all is the creation of a list of n
y opinion, because it does exactly what
you want. The second does extra work and might cause someone to wonder
why you haven't just returned a reference to the array.
The second version is necessary when the array might persist between
subroutine calls and you effectively need to
res lines which differ only in case.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Sun, Jul 13, 2014 at 06:44:18PM -0400, ESChamp wrote:
> Paul Johnson has written on 7/13/2014 5:00 PM:
> > perl -nale 'print $F[-1]' < original_file.txt > just_email.txt
>
> e:\Docs\>perl -nale 'print $F[-1]' < 4sam.txt > just_email.txt
> Ca
erl -nale 'print $F[-1]' < original_file.txt > just_email.txt
perldoc perlrun if you want to see why that works. Take a look at the
-a option. The -1 index into @F says use the last element of the array.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mai
1.31 in CPAN distribute.
As I write this, the latest version seems to be 1.38:
https://metacpan.org/pod/List::Util
Depending on the distribution you are using you might have a tool to
automate the process of recursively installing dependencies.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj
;
>
> I would expect the output match three of them, however, it only matches:
> --
> 'okay i know now'
> "from time to time"
>
> ---
> leaving '
erating over it using each(), because this may confuse Perl:
This is true in general, but the documentation explicitly states that it
is safe to use delete on the key most recently returned from each, as
Alex is doing here. This is good because, as we see here, it can
reasonably be expected to wo
nd = $project =~ m|$$_|;
> $dump = Data::Dumper->Dump([$_, $project, $$_, $found]);
> $logger->trace(qq(dump=$dump));
> }
>
> I can't explain why $found is not true on the 3rd pass. Does this
> have something to do with the way I'm dereferencing the blessed
> object
7}[a-f0-9]{2})\b/ ? "$1\n" : $_' < file
You should probably try and understand it before trusting it.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
= map {$_ => 1} split(" ", $params->{direction});
> }
> elsif (ref($params->{direction}) eq 'ARRAY')
> {
> %hDirection = map {$_ => 1} @{$params->{direction}}; # <-- HERE
> }
> else
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
($bar);' which just
> doesn't seem like the right thing to do to figure out why a test is
> failing?
Perhaps you are looking for Test::Differences ?
https://metacpan.org/pod/Test::Differences
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginne
le.
Also, you'll want to delete the semicolon on the package declaration
line. What you have currently is an old-style package declaration and
then an ordinary block, meaning that anything after the block is also in
package Hello.
Finally, 1 is a boring value to return. Be creative!
See ht
your understanding
of your requirements, don't let anyone without that understanding tell
you otherwise.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Sat, Jan 25, 2014 at 06:41:00PM +0100, Luca Ferrari wrote:
> On Sat, Jan 25, 2014 at 4:12 PM, Paul Johnson wrote:
>
> > $ perl -E '$h = { a => qr/y/ }; say $_ =~ $h->{a} for qw(x y z)'
>
> Thanks, but then another doubt: having a look at
> http://perl
nto account something special?
Yes, this is possible. You need to use qr// to construct your RE:
$ perl -E '$h = { a => qr/y/ }; say $_ =~ $h->{a} for qw(x y z)'
1
$
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
tively, you could call a method on the FileHandle:
REPORT->format_lines_per_page(10);
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
h Perl will make you a
better developer.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
until you encounter the '__DATA__' line. Then start reading the data
> lines.
The first choice is the correct one.
Ideally, you should use the SEEK_SET constant from Fcntl. perldoc Fcntl
for details.
And for your third approach, you need C< $. = 0; >
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
n PERL; however, is seems
> not to work. It always returns "The file $file_seqs does not exist!!!".
>
> Do you know where I am making a mistake?
I don't know. How are you calling your program? Because it seems to
work correctly for me.
--
Paul Johnson - p...@pjcj.net
htt
'say $|-- for 1 .. 5'
0
1
0
1
0
[ If it's not obvious, my tongue was in my cheek for half of this post. ]
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
e simple solution is good enough.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
rom thousand to millions of lines.
> If I use perl in-built function substr() to data extraction, it has huge
> impact on performance.
Compared to what?
> Is there any alternative for this?
Perhaps unpack() or regular expressions, but I doubt either would be
much faster, if at all.
--
Paul
han sufficient for most purposes.
It's probably also more than sufficient for this list.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
> Any better suggestion ?
Depends on how you define better, but perhaps
$ perl -ne 'print if /BEGIN$/ .. /END$/' < file > /tmp/a
$ perl -ne 'print if /BEGINDL$/ .. /ENDDL$/' < file > /tmp/b
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
s/$rx/$r/e;
> }
>
> Can anybody think of a straightforward way to do this?
This is a situation where string eval is warranted:
eval "\$s =~ s/\$rx/$r/";
Three points:
- make sure you trust your input
- be sure to check $@
- there's no need to check if the pattern matche
On Mon, Dec 24, 2012 at 08:01:11PM +, Rob Dixon wrote:
> On 24/12/2012 13:08, Paul Johnson wrote:
> >On Sun, Dec 23, 2012 at 06:57:38PM +0530, punit jain wrote:
> >>I am seeing which lines have both POP and Webmail as below :-
> >>
> >>if( $line =~ /
d. The only reason I can see for doing that would
be to find out in which order you found the items.
In any case, the easiest way to find out whether two substrings appear
in the same same string is to program the way you define the problem:
if (/WebMail/ && /POP/) { ... }
--
Paul John
lso prints the text between the two instances, right?
> Any suggestions ?
You need a non greedy match .*? instead of the greedy match .* that you
are using. Then you'll need to use while instead of if.
Or perhaps you'd prefer:
$ perl -ne 'print if /BEGIN:VCARD/ .. /END:VCARD/' <
nna
> update it. I heard that we'll use 5.12 in the next update of our product
> though.
>
>
> On Thu, Nov 22, 2012 at 3:32 PM, Paul Johnson wrote:
>
> > On Thu, Nov 22, 2012 at 11:37:15AM +0530, Chankey Pathak wrote:
> > > In our company we were using this co
your perl version. It's unsuported, buggy and I'm
sure it has security problems which have been fixed in the last eight
years. (That's always a good case to make to management folk.)
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
between... I believe that the ".*",
> combined with the "s" modifier, in the regex is causing this match to be
> made.
>
> What I'm not sure how to do is tell Perl to search from START to the next
> END and then start the search pattern over again with the nex
On Mon, Oct 29, 2012 at 12:48:33PM +0100, Hermann Norpois wrote:
> But still: What is wrong with $/="^\s+$" ?
>From perldoc perlvar:
Remember: the value of $/ is a string, not a regex. awk has to be
better for something. :-)
--
Paul Johnson - p...@pjcj.net
http://www.
On Sun, Jul 22, 2012 at 11:09:10PM +0200, Jenda Krynicky wrote:
> From: Paul Johnson
> > You need a mixture of the two approaches: map to prepend "not in:" and
> > join to join them.
> >
> > my $query = join " and ", map "not in:$_",
;";
> foreach my $folder ( @folders )
> {
> $query = join "and" "not in:$folder" "$query";
> }
>
> but still same result and this time extra "and" in beginning.
>
> Any idea how to do this ?
You need a mixture of the two approaches: map to p
at) you can see the basis
for a solution.
So, to match either three or five "a"s for example, you could do this:
/^(?:a{3}|a{5})$/
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Tue, Jun 12, 2012 at 07:11:57PM +0300, Shlomi Fish wrote:
> OK. For Windows there is now http://dwimperl.com/ which is open-source and is
> considered better than Activestate Perl.
[citation needed]
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beg
hank you,
>
> Chris
>
> sub site_offAir {
> for (values %{$href->{$_[0]}}) {
> return 1 if $_ eq 'ND'; #need to test all values are eq to 'ND'
> }
> return '';
> }
I would imagine it to be much easier to look at it from the other w
ver perl you've "switch"ed to? If you are, I
don't think you really want that (some important programs on your system
may stop working). If not, what are you asking?
Are you actually looking for this?
$ perlbrew exec perl my_snazzy_program.pl
--
Paul Johnson - p...@pj
sessment correctly?
Please don't care about this until your code is running correctly but
too slowly and profiling has determined that this is the bottleneck.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
nds like something that Mason could do. And I expect there are
a number of other modules on CPAN that could also manage that. But take
a look at https://metacpan.org/module/Mason
Good luck,
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
f you run "perlbrew" or "perlbrew help" you'll see the main commands.
The one you want is "perlbrew self-upgrade". Just run that and it'll do
the rest.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubs
se'
>
> (Note that the docs (at least on my copy of perl) have a typo ... it
> says @words, not @word.)
This has now been fixed by
http://perl5.git.perl.org/perl.git/commitdiff/5a0c7e9d45ff6da450098635b233527990112d8a?hp=68cd360812f9eaa2d34c45c501e2fef87c44ccde
and will be i
y you
would need to use it.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
The -p option to Deparse tells perl to put in parentheses even when they
are not necessary, and in this case it explains the otherwise puzzling
behaviour you have seen.
The other bit of knowledge that might be required is that in Perl
assignment produces an lvalue (meaning you can assign to it)
narrow down the problems that
way. This involves chaning the time the cronjob runs every time you
need to run a test, which is a real pain and seems like the sort of
thing for which there really should be a better solution. With luck,
someone will reply and say what that solution is.
Good luck,
--
In this case I suspect there'll be at least at
many people telling you to drop the braces as there are to add them.
Indeed, it could be argued that adding them goes against the perlstyle
advice:
Omit redundant punctuation as long as clarity doesn't suffer.
So, to a certain extent
eio1.pl line 16.
This bug appears to have been fixed in perl 5.12.0 and later. Since
5.10 and earlier versions are officially unsupported you should really
upgrade if you can. With the imminent release of 5.16, 5.12 will
shortly become unsupported.
> > It looks like you are tyring to open two different filehandles. You
> > need to delcare HDL.
> > open my $HDL, '>', "fileio2.txt";
> >
> > should fix it.
No, it won't.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
I don't understand the above error message well,
The immediate problem you are seeing is that you should be using the
number zero (0) rather than the uppercase letter O (O).
If you are not using a font which allows you to easily distinguish
between then two, may I suggest inconsolata as
the original methods don't
> need to be modified, I'm going to scoop up the code globs, modify
> them, then reinstall them back into the class.
Perhaps you might like to look at Moose, and in particular the method
modifiers?
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
-
oreach my $entry ( keys %{ ref $dog }:: ){
> ...
> }
>
> Is there a proper way to do this that someone could point out?
no strict "refs";
foreach my $entry ( keys %{ ref($dog) . "::" })
But why? If you really need class introspection then OK, but for
general pr
rldoc -f glob" for the details. Using
bsd_glob would clean up the (first) code a little.
> I know this isn't a beginner's question
None of the concepts in this code are particularly tricky, but there are
quite a few of them in a short piece of code.
>Is
st to explicitly state the array:
All generalisations are false.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
> instances and directories for logs. Perl myprogram v2 consolidates
> into one directory is the reason for merge.
This is zsh. I presume it could be converted into bash fairly easily.
Run it from new_dir.
for f (../dir*/*) { cat $f >>| $f(:t) }
:t is essentially basename.
--
Pau
't return what you think it does.
If you are using a recent perl (5.14), add a /r modifier to it.
If not, perhaps something like: @sympd_dev_list = map { (split)[1] }
@sympd_list
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
; 3600
> 3700
>
> any clues how to do this well?
The usual trick is to do something like
$r = int($n / 100 + .5) * 100;
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
bin/cpan.
Or put /usr/local/bin early on your path so that a plain "perl" or
"cpan" will pick up the /usr/local/bin versions. Just be careful that
you don't inadvertently call some other program in /usr/local/bin now
having different behaviour to what would otherwise
ncost=0.00&maxcost=.99&minavail=0&maxavail=&r_all=All&g_all=All&foil=nofoil&for=no&sort1=4&sort2=1&sort3=10&sort4=0&display=2&numpage=25'`;
for (@html)
{
print "Found [$1]\n" if /\$(.*?) <\/td>/;
}
This s
try( @a );
> print "After: " . $a[ 0 ][ 1 ] . "\n";
>
> exit;
> =
> What happens:
> Before:
> After: 7
> =
> What I would expect:
> Before:
> After: 0
> =
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
ou need, the following may be of some help:
#!/usr/bin/perl
use strict;
use warnings;
my @a = (1, 7, 54, 2);
my @b = (2, 89, 78, 33);
my $l = [ sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] }
map [ $a[$_], $b[$_] ], 0 .. $#a ];
@a = map $_->[0],
e perlcritic anyway. If you want
to keep using this policy then I suppose you should either adhere to it, or
tweak the configuration until you are happy with it.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands
https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Critic
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
re @INC is set.
> >
>
> Compile time IIRC.
Run "perl -V" to see what it is set to.
> > mike@/deb40a:~/perl> perl -v
> > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Do you have $PERL5LIB or $PERLLIB set? Or something strange like
PERL5OPT="
running
> * Makefile.PL.
Is this relevant?
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
roblem since they might just be rebuilt with all the
> same properties and mismatches.
You'll probably need to do something like that. Or tell it to use your system
tools somehow. Or get your system tools out of the way somehow.
You *may* be able to get away with explicitly setting @INC, perhaps in
$PERL5OPT.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
with
LD_LIBRARY_PATH or something similar?
You could track this down, depending on how much effort you wanted to
put into it. You could start by stracing the whole process. Or you
could locate a correct version of the package. Or you could try
compiling everything up yourself. Or just the sourc
ntainership when
they are happy that you could manage that. Or if you have some modules that
you like or are familiar with, you could ask the author directly. Finding
something from RT and sending in a patch for it would be a very good
introduction.
Thanks for being willing to give back.
Good lu
d
lets you focus on the intent of the code rather than the syntax.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
3-5
>
> 1-5,2-3,4-6
> 1-5,2-4,3-6
> 1-5,2-6,3-4
>
> 1-6,2-3,4-5
> 1-6,2-4,3-5
> 1-6,2-5,3-4
>
> Can anyone help me in this
Unlikely, unless you are a bit more specific about what you are trying to do.
And even then, it's hard to help you to improve your code
27;s when you would
want $cust and $cxt, or $customer and $context depending on the size of their
scope.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
ed status. Asking for opinions is a much better strategy,
but ultimately you'll need to try it for yourself and see if it does what you
want.
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Fri, Sep 09, 2011 at 12:11:04PM +0300, Shlomi Fish wrote:
> next if (!length($dist) or !length($cell) or !length($sect));
>
> There's a better way using List::MoreUtils :
For some definition of "better".
See also De Morgan.
--
Paul Johnson - p...@pjcj.net
htt
e moment. This is not for a commercial job or for a school
> assignment.
Perhaps you are looking for mailshar, which is part of GNU sharutils?
--
Paul Johnson - p...@pjcj.net
http://www.pjcj.net
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail
1 - 100 of 916 matches
Mail list logo