"expect -f '$theScript' '$cd' pwd 'find . -name '*.std*' -s (^^^^^^^^^^) (^^^) (^^^^^^^^^^^^^^) (^^^ #### 0: expect 1: -f 2: $theScript 3: $cd 4: pwd 5: find . -name *.std* -o -name ULOG.* -mtime +9 -type f -exec rm {} \; 6: pwd #### system( 'expect', '-f', $theScript, $cd, 'pwd', "find . -name '*.std*' -o -name 'ULOG.*' -mtime +9 -type f -exec rm {} ';'", "pwd", );