hello everyone :) today is a beautiful day :)
let's say i have write a program called sample.pl and i put it in /home/aaa/. so, the location of this program is /home/aaa/sample.pl
so, when i am running this program, i need to get the folder name "aaa" to be used as a variable inside this program. how can i do so?
my real situation is like this:
when there is new mails come in, my procmail will automatically run this program "sample.pl" at /home/aaa/sample.pl. then, in this program, i need to retrieve some data from the database using the user id, which is "aaa". that's why i need to get the folder name "aaa".
how can i do so?
thank you very much :)
regards,
hweefarn :)
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.