I've been googling for a while, but I cannot find a function the read just first line of a file.
I need to read first line of a text file and extract the date from it.
new to perl.
open my $file, '<', "filename.txt"; my $firstLine = <$file>; close $file;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With