in reply to How can I enter the data of different variables from a text file into a perl program?
I bet there will be people complaining about this working program. ;-)use 5.010; use strict; use warnings; $_ = `cat data.txt`; s/\b[a-z]/\$::$&/g; eval; no warnings 'once'; say $::x1 * $::y1; say $::x2 * $::y2; say $::x3 * $::y3; say +($::x1 * $::y1) / $::x2; __END__ 38.38 67.28 52.07 6.61724137931034483
|
---|
In Section
Seekers of Perl Wisdom