Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Default variable within loops

by muba (Priest)
on Jun 21, 2012 at 02:41 UTC ( #977539=note: print w/replies, xml ) Need Help??

in reply to Default variable within loops

use strict; use warnings; my @a = qw(foo bar baz); my @b = qw(foo bar biz); foreach my $temp (@a){ my @matches = grep {$temp eq $_} @b; print "Matches for $temp: ", join(", ", @matches), "\n" if @matche +s; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977539]
[ambrus]: just blindly recommending to use LaTeX is a bad idea now.
[Discipulus]: I havery limited needs in such field. Sometimes (for children party invitations) i draw something by hand and I scan it to include into an ms doc.
Discipulus havery can be a good neologism for: have very..;=)
[ambrus]: Discipulus: sure, it's just that, look, some people (including me) have such unreadable and slow handwriting that writing an article or slides by hand would be a very bad idea.
[choroba]: it might bery useful for other verbs, too
[ambrus]: (and I have a need for at least decent formatting too)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-09-26 11:25 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (293 votes). Check out past polls.