fork download
  1.  
  2. #! /usr/bin/perl -w
  3. print "File name to read in:" ."\n";
  4. $ my_variable = <STDIN>;
  5. Open (FILE, $my_variable);
  6.  
  7. while ()
  8. {
  9. print "(N) for Name"," ","(#) for Number search"," ","(.) to exit:"."\n";
  10. $ my_input = <STDIN>;
  11. chomp ($ my_input);
  12. if ($ my_input eq "N")
  13. {
  14. print "Enter Name:" . "\n";
  15. $ name= <STDIN>;
  16. chomp ($ name);
  17. }
  18. elsif ($ my_input eq "#")
  19. {
  20. print "Enter Number:" . "\n";
  21. %find = <STDIN>;
  22. }
  23. elsif ($ my_input eq ".")
  24. {
  25. print "Done!!!" . "\n";
  26. }
  27. else
  28. {
  29. print "Error" . "\n";
  30. }
  31.  
  32. chomp($find);
  33. print ($list($find) . "\n");
  34. }
Runtime error #stdin #stdout #stderr 0s 17496KB
stdin
Standard input is empty
stdout
File name to read in:
stderr
Undefined subroutine &main::Open called at prog.pl line 5.