Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    Input not an float...try again
    enter a float (decimal required): 3.12345
    3.12345 Ok!!
    
  2. or download this
    $float =~ s/^\s*|\s*$//g; #delete leading/trailing spaces
    return $float;
    
  3. or download this
    $float +=0;  #causes creation of numeric value for $float!
    return $float;
    
  4. or download this
    #!/usr/bin/perl
    use strict;
    ...
    @colors = grep{!$drop{$_}}@colors;
    
    print "@colors \n";  #red green blue yellow purple
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    ...
    @colors = @result;
    
    print "@colors \n";  #red green blue yellow purple