Hey, thats pretty slick. I am getting a "my" variable $line masks earlier declaration in same scope when warnings are turned on, so you might want to drop the my from the second my $line invocation.
-Blake
| [reply] [d/l] [select] |
Sorry for appearing thick headed, but what does this do that
you could not get from cat -n or a good editor (setnu.el mode for emacs and <ESC>:set nu for vi).
And I do use cat -n on windoze boxes too.
I do appreciate your effort though. | [reply] |
Well actually this adds line numbers to your code while still making it runeable. You add that use Filter::NumberLines; at the top, you run your code and the line numbers appear. After that, you still can run the code without actually having to remove the line numbers. Check the examples on the URL mentioned above. If you installed the package, those examples REALLY work, they're not just pretty. BTW if you really want to see some source filters in action, I recommend looking into Acme::Bleach and Acme::Buffy.
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.
| [reply] [d/l] |
Heh.
Now all you have to do is remap my to LET, substr to MID and # to REM... and we'll be on our way to a halfway decent BASIC interpreter!
--g r i n d e r
| [reply] |