OpenCores
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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.