Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: The error says the value is uninitialized, but it works anyway

by Marshall (Abbot)
on Aug 20, 2019 at 00:07 UTC ( #11104708=note: print w/replies, xml ) Need Help??

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 
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2019-11-11 20:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (63 votes). Check out past polls.

    Notices?