Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: compilation error on 5.8 with $^V gt 'v5.10.0'

by ikegami (Patriarch)
on Apr 03, 2018 at 10:49 UTC ( [id://1212239]=note: print w/replies, xml ) Need Help??


in reply to Re: compilation error on 5.8 with $^V gt 'v5.10.0'
in thread compilation error on 5.8 with $^V gt 'v5.10.0'

Oops, that still leaves the issue of ~~. Well, seeing as it's a broken experimental feature, best if you simply avoid it!

Not only that, your smart-match version is far less efficient. Use one of the following:

# Unordered my %diff; @diff{ @insttab } = (); delete @diff{ @inst }; my @diff = keys %diff;
or
# Ordered my %in_inst; @in_inst{ @inst } = (); my @diff = grep { !exists($in_inst{$_}) } @insttab;

Both are O(N+M) (as opposed to the O(N*M) smartmatching approach).


Generally speaking, you'd want two different modules with the same interface in that situation. Simply load the correct module using if (the module).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2024-04-23 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found