I've tried: print `cd desktop`; print `mkdir robert`;
OK: why are you trying to print values from a shell command that isn't going
to write anything to STDOUT/STDERR?
As belg4mit pointed out what you really want to use are
the built-in functions. Examples:
:
:
:
mkdir $some_dir;
chdir $some_dir;
:
:
Now, what I've shown above is a very basic way of using
those built-ins. You can also trap some errors from
these built-ins as well. For instance:
|
|
chdir $some_dir or die "HEY! I couldn't CD into $some_dir:$!";
|
|
mkdir $another_dir or die "OHMIGOD! I couldn't make $another_dir:$!";
|
|
Now, it must be noted that under *nix the value of umask
is going to influence the behavior of mkdir
and what the resultant permissions of the created directory
are. But that, kind monk I leave as an
excersise in your own ability to learn more about.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.