This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
class Fsh | |
def cmd(c) | |
# parse a command line and call appropriate function, returning output | |
c.match /^(\w+)\s*(.*)/ # only handles one argument | |
cmd = $1 | |
arg = $2 | |
case cmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
package MyFoo; | |
use Data::Dumper; | |
use overload | |
'""' => "stringify", |