in reply to Strange Behavior

I ran on Windows 98 with Perl v5.6.1:
&remove_title; sub remove_title { system "cls"; print "Enter Title you wish to remove (this will delete the .iso):"; chomp($title = "default." . <STDIN>); print $title . "\n"; print "test"; print "test"; sleep(2); }
Result:
Enter Title you wish to remove (this will delete the .iso):xxx default.xxx testtest

(The sleep occurs also.)
chas
(Have you looked at the script file with an editor in binary mode to check for any invisible characters which might be gumming things up? That's happened to me...Am I misunderstanding the problem?)

Replies are listed 'Best First'.
Re^2: Strange Behavior
by Anonymous Monk on Mar 23, 2005 at 02:55 UTC
    Yes that is an unfinished code segment, I was just testing my subs out, I moved the data up into the switch statement, it magically worked, then back down to the sub and it worked again.