I too am new to Perl and could use some assistance. I have to telnet into a server and delete the following directory structure(e*Gate Intelligent Qs) under iq...
$usrid:/ep005/egate/client/iq>ls
{2CE791F8-B956-11D7-8A47-D2047591D9E7} {E966E092-0086-11D7-AE05-ABCC42
+0F384C}
{2D3A2FE4-B956-11D7-AA01-9928386F0C64} {E9684022-0086-11D7-AE05-B56CD2
+0DA8C8}
{2EB061E0-B956-11D7-8FAD-A2B3FC810BD6} {E9699C1A-0086-11D7-AE05-DE7A18
+3014AC}
{E9404D1A-0086-11D7-AE05-C74CFA34F9DD} {E96B2BC0-0086-11D7-AE05-B76DF2
+2F3513}
I have not been successful in accomplishing this. In my script, once I am in the iq directory I tried
$ftp->rmdir("/ep005/egate/client/iq/$folders");
$ftp->delete("/ep005/egate/client/iq/{*}");
system("rm -r {*}");
system("rm -r *");
I pull in a list of the items into an array, sort the list then I tried running any of the statements above and neither seem to work. When I telnet manually into the server I can run this command to delete the structures
rm -r {*}
What command would delete each one or all of them under the iq directory?
Edited by Chady -- added code tags.
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.