The problem I am having is that 'foo bar' is has a space in it so I can't split the scalar returned from readline() by spaces.So don't. Learn about the m// operator, read `perldoc perlop' and `perldoc perlre'.
if( $line =~ /^ ( \w+ ) # word \s+ ( .+? ) \s+ ( \w+ ) $/ ) { my( $command, $something, $lastword ) = ( $1, $2 , $3 ); }
In reply to Re: readline and multi-word commands
by PodMaster
in thread readline and multi-word commands
by nick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |