
Chris Charley
User
Feb 17, 2016, 4:00 PM
Post #4 of 7
(1918 views)
|
Re: [regex2012] How do I send output of print statement to array
[In reply to]
|
Can't Post
|
|
Your print is printing lines that have been seen before. Would you like an array containing ('a line', 'another line', 'a line', 'a line', 'seen before', 'another line')? I think that you should get the same results by pushing to an array as the print statement. push my @array, $_ if defined $duplicates{$_}; print "@array"; Should be equal to print if defined $duplicates{$_};
(This post was edited by Chris Charley on Feb 17, 2016, 4:06 PM)
|