Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Output not correct

by tinita (Parson)
on Nov 26, 2018 at 19:15 UTC ( [id://1226385]=note: print w/replies, xml ) Need Help??


in reply to Output not correct

Ok, this is called debugging and it will probably also help you in the future.
When a pattern matching or a comparison or a grep does not work like you think it should, you can simply print the contents of the variable(s).
use Data::Dumper; local $Data::Dumper::Useqq = 1; # show things like newlines, tabs as " +\n", "\t" print Dumper $input_A; print Dumper \@test_input_array;
I suspect the elements in @test_input_array have spaces where you don't expect them (you split on a single comma and forget about the spaces).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found