anitaord has asked for the wisdom of the Perl Monks concerning the following question:
open(FH, "/Users/anaordonez/Documents/my_languages.txt")or die "Sorry! +! couldn't open"; print "Reading file \n"; # Reading the file till FH reaches EOF while(<>) { # Printing one line at a time next unless $_ = "Java"; print $_; } close;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: next unless not working
by Fletch (Bishop) on Feb 05, 2025 at 17:03 UTC | |
Re: next unless not working
by jo37 (Curate) on Feb 05, 2025 at 17:24 UTC | |
by choroba (Cardinal) on Feb 05, 2025 at 17:27 UTC | |
Re: next unless not working
by johngg (Canon) on Feb 05, 2025 at 22:11 UTC | |
by choroba (Cardinal) on Feb 05, 2025 at 23:30 UTC | |
by Fletch (Bishop) on Feb 05, 2025 at 22:19 UTC | |
Re: next unless not working
by marto (Cardinal) on Feb 05, 2025 at 17:19 UTC | |
by Fletch (Bishop) on Feb 05, 2025 at 17:22 UTC | |
by marto (Cardinal) on Feb 05, 2025 at 17:23 UTC | |
by Fletch (Bishop) on Feb 05, 2025 at 17:38 UTC |