Guest User

Untitled

a guest
Jun 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. my $fortune = `/sw/bin/fortune -s`;
  7.  
  8. $fortune =~ s/"/\\"/g;
  9.  
  10. open(OSASCRIPT, "| /usr/bin/osascript");
  11.  
  12. print OSASCRIPT <<EOF;
  13. tell application "iChat"
  14. set status message to "$fortune"
  15. end tell
  16. EOF
  17.  
  18. close(OSASCRIPT);
Add Comment
Please, Sign In to add comment