perl -le '$pv=stat(/dir/filename);print "$pv->uid,$pv->gid,$pv->mode;" +' [download]
In reply to Perl one liner and stat function by csarid