From: Simon H. <hu...@ea...> - 2000-01-30 22:35:37
|
Hi, I've been looking at psh a bit more recently. It's really getting there now. I was looking at a way to do the long outstanding save matches over iterations of psh parsing of commands. Stuff like the following should then work: psh$ $a="one two three"; $a=~/^([^ ]*) ([^ ]*) ([^ ]*)$/; print "$1\n$2\n$3"; one two three psh$ print "$1\n$2\n$3\n"; one two three It's the second of these that doesn't work at the moment because psh matches internally the commands entered in order to work out what you mean. This wipes out $1 et al. I've been trying to patch PerlEval.pm (in the CVS version) which is the stuff that gets run when psh realises it's perl you're trying to parse. I've attached a script which I can make save changes in the scope of my code but when I uncomment the eval and run something like the above it no longer works. Anyone know how perl copes with eval and scope of $1 etc internally? If anyone has any ideas... -- ----------( "Aren't five cups of tea too many from one )---------- ----------( bag?" asked Tom weakly. )---------- Simon ----( )---- Nomis Htag.pl 0.0.4 |