The  do_it_all() functions in the OP and here use methods for determining the biggest and smallest numbers from the argument list that I've extracted and respectively named  do_it_all_1() and  do_it_all_2() below.

c:\@Work\Perl\monks\pritesh_ugrankar>perl -wMstrict -le "do_it_all_1(1, 2, 3); do_it_all_2(0, 1, 2, 3); ;; ;; sub do_it_all_1 { print qq{do_it_all_1: (@_)}; ;; my $biggest = shift @_; foreach my $num (@_) { if ($num > $biggest) { $biggest = $num; } } ;; my $smallest = shift @_; foreach my $smallnum (@_) { if ($smallnum < $smallest) { $smallest = $smallnum; } } ;; print qq{smallest == $smallest, biggest == $biggest}; } ;; sub do_it_all_2 { print qq{do_it_all_2: (@_)}; ;; my $biggest = @_; foreach my $bignum (@_) { if ($bignum > $biggest) { $biggest = $bignum; } } ;; my $smallest = @_; foreach my $smallnum (@_) { if ($smallnum < $smallest) { $smallest = $smallnum; } } ;; print qq{smallest == $smallest, biggest == $biggest}; } " do_it_all_1: (1 2 3) smallest == 2, biggest == 3 do_it_all_2: (0 1 2 3) smallest == 0, biggest == 4
Questions:

(The foregoing is intended as propaganda for a Test::More development approach that might have uncovered these inconsistencies earlier.)

One other small perplexity. You describe the feedback given you regarding the code of the OP as "[t]hat I did not try to address the issue, but circumvented the issue ..." But the "issue" seems to be described in the paragraph beginning "Given a random series of numbers, ...", and your code seems to address this requirement statement directly. (Others have touched on this.) Can you clarify the dissatisfaction of your instructor/TA? It doesn't make sense to me. (The whole business about Linux Mint/Ubuntu/whatever seems entirely irrelevant.)


Give a man a fish:  <%-{-{-{-<


In reply to Re: add missing elements and remove duplicates....and some more questions. by AnomalousMonk
in thread add missing elements and remove duplicates....and some more questions. by pritesh_ugrankar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.