die "Not supported.\n" if /[^-+0-9x]/;
To avoid Use of uninitialized value $_ in pattern match (m//) at ... I think this should be
die "Not supported.\n" if $eq =~ /[^-+0-9x()]/;
or maybe better
die "Not supported: '$1' \n" if $eq =~ /([^-+0-9x()]+)/;
(both tested).
Give a man a fish: <%-(-(-(-<
In reply to Re^2: How would you solve a user-inputted simple one-variable Linear Equation
by AnomalousMonk
in thread How would you solve a user-inputted simple one-variable Linear Equation
by nat47
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |