$theScript ="temp.exp"; $cd = "cd ../../logs/tu/tull"; $cmd = "expect -f '$theScript' '$cd' pwd 'find . -name '*.std*' -o -name 'ULOG.*' -mtime + 9 -type f -exec rm {} \\;' pwd"; print "$cmd\n"; system($cmd); #### ---------------------------- - Entering SHELL session . - ---------------------------- > cd ../../logs/tu/tull > pwd /logs/tuxedo/tuxbull > find . -name *.std* -o -name ULOG.* -mtime +9 -type f -exec rm {} \; pwd find: missing conjunction > pwd /logs/tu/tull