URL
https://opencores.org/ocsvn/socgen/socgen/trunk
Subversion Repositories socgen
[/] [socgen/] [trunk/] [tools/] [verilog/] [peval] - Rev 133
Go to most recent revision | Compare with Previous | Blame | View Log
################################################## ############
#!perl
use strict;
$| = 1;
while (1) {
print "Please enter your expression (or 'exit' to exit): ";
chomp(my $cmd = <>);
exit if ($cmd =~ /^\s*exit\s*$/);
my $result = eval "$cmd";
print "Result = $result\n\n";
}
################################################## ############
Go to most recent revision | Compare with Previous | Blame | View Log