Take a look at 'man pbpaste' at the command line.
pbpaste and pbcopy both use standard in and standard out so JD is right for pbpaste but to copy something it needs to come from standard in:
Here is I am in a loop through multi lines from the copied from the clipboard and being feed back one line at a time to the clipboard:
system "printf \"$_\" | pbcopy";
Larry Furnival Manager Instructional Media Lab Academic Computing Services/Computing Information Services Teachers College, Columbia University On Apr 14, 2005, at 8:04 AM, John Delacour wrote:
At 5:20 pm +1000 14/4/05, John Horner wrote:
More idle curiosity than a desperate need to know, but is it possible to access the OS X clipboard with perl, and if so, how?
Provided you need to get only us-ascii stuff, then
print `pbpaste`;
Otherwise
print `osascript -e 'the clipboard as unicode text'`;
or use Mac::Carbon
JD