in reply to Re: next unless not working
in thread next unless not working
Good point. Playing around with qwen2.5-coder it came up with the below version incorporating both this suggestion and some of mine.
use warnings; use strict; my $file_path = "/Users/anaordonez/Documents/my_languages.txt"; open(my $fh, '<', $file_path) or die "Sorry!! couldn't open '$file_pa +th': $!"; print "Reading file \n"; while (my $line = <$fh>) { chomp $line; print "$line\n" if $line eq "Java"; } close($fh);
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: next unless not working
by marto (Cardinal) on Feb 05, 2025 at 17:23 UTC | |
by Fletch (Bishop) on Feb 05, 2025 at 17:38 UTC |