Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
In response to blazar's suggestion in 626986:
This is a rough conversion table from UNIX commands to Perl.
Please note that there are not always direct single equivalents.

Please feel free to add more, there must be lots.
. do built-in
awk perl ;-) (often 'split') built-in
See also a2pBase program
basename File::Basename::basename Base module
cat while(<>){print} built-in
ExtUtils::Command::cat Base module
cd chdir built-in
chmod chmod built-in
chown chown built-in
cp File::Copy Base module
ExtUtils::Command::cp Base module
cut split built-in
date localtime built-in
POSIX::strftime Base module
declare see typedef
df Filesys::Df CPAN
diff File::Compare Base module
dirname File::Basename::dirname Base modules
echo print built-in
egrep while(<>){print if /re/} built-in
eval eval built-in
exec exec built-in
pipe (co-processes) built-in
open (file descriptors) built-in
export Assign to %ENV Hash variable
find File::Find::find Base module
ftp Net::Ftp Base module
function sub built-in
grep see egrep
hostname Sys::Hostname::hostnameBase module
integer int built-in
kill kill built-in
ln link built-in
ln -s symlink built-in
ls glob built-in
opendir/readdir/closedir built-in
stat/lstat built-in
mkdir mkdir built-in
mkpath ExtUtils::Command::mkpath Base module
mv rename built-in
ExtUtils::Command::mv Base module
od ord built-in
printf built-in
print print built-in
printf printf built-in
ps Proc::ProcessTable CPAN
pwd Cwd::getcwd Base module
rand rand built-in
read See I/O Operators built-in
rm unlink built-in
ExtUtils::Command::rm Base module
rm -f ExtUtils::Command::rm_rf Base module
sed s/// (usually) built-in
See also s2pBase program
select Shell::POSIX::select CPAN
sleep sleep built-in
alarm built-in
sort sort built-in
source do built-in
tail File::Tail CPAN
telnet Net::Telnet CPAN>
times times built-in
touch open/close built-in
ExtUtils::Command::touch Base module
trap %SIG Hash
sigtrap pragma
typeset my built-in
typeset -i int built-in
typeset -l lc built-in
typeset -u uc built-in
typeset -Z sprintf built-in

updates: link/symlink, thanks to Crackers2
Net::Telnet added with thanks to regexes
a2p and s2p, thanks to Trizor
cut, thanks to RMGir
ps, thanks to Nasrudin

In reply to UNIX 'command' equivalents in Perl by cdarke

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (5)
    As of 2015-11-29 05:48 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (747 votes), past polls