Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: PROTEIN FILE help me pleaseee

by choroba (Bishop)
on Jan 30, 2013 at 12:19 UTC ( #1016051=note: print w/replies, xml ) Need Help??

in reply to PROTEIN FILE help me pleaseee

What do you mean by "doesn't work"? Is the number of F's too big? Does the program output any error messages?

When glaring at your script, I can see that

  • you do not chomp the $proteinfilename after reading it from STDIN. The real file name probably does not contain a newline at the end.
  • if the open is not successful, your program continues. Are you really interested in the results, if the file cannot be found? Use the idiom
    open my $FH, '<', $filename or die "Cannot open: $!";
  • next takes a label as a parameter. There are no labels in your code.
  • you do not indent the code. Once you are advanced enough to use loops, please also learn to indent the code. Without indentation, your code becomes write-only, unreadable mess for humans.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016051]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-06-22 21:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.