Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What does your old Perl code look like?

by roho (Canon)
on Jun 18, 2019 at 11:18 UTC ( #11101511=note: print w/replies, xml ) Need Help??


in reply to What does your old Perl code look like?

circa 1996

#!/usr/bin/perl ############################################################# # Name: compare # Desc: Compare contents of two arrays and print the diff. ############################################################# @array1 = ("John", "Jane"); @array2 = ("John", "Jane", "Sally", "David", "Joe", "Bev"); local(%mark); grep($mark{$_}++,@array1); @result = grep(!$mark{$_},@array2); print "\n"; print "array1: @array1\n"; print "array2: @array2\n"; print "\n"; print "differ: @result\n"; print "\n";

"It's not how hard you work, it's how much you get done."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11101511]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2019-12-07 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (160 votes). Check out past polls.

    Notices?