Hi monks,
can you please look at my situation
I have a structure where in all my files are in two
directories /files/gui and /files/db and my cgi files
use the files under these directories .

so i have in all files the above package names

(eg)
package files::db::newfile; use files::db::skills_db qw//;
use files::gui::skills_gui qw//;

Every time i copy these files under different paths to create new set ups

newpath/gui and newpath/db/

i have to change these names in all of my files
(eg)
package newpath::db::newfile; use newpath::db::skills_db qw//;
use newpath::gui::skills_gui qw//;>

My question is i dont want to change these everytime, i
tried setting $ENV{'FOLDER'}="newpath" ,

package $ENV{'FOLDER'}::db::newfile;
use $ENV{'FOLDER'}::db::skills_db qw//;

but it doesnt replace these instead i get errors
Can any one suggest a way to this?

Thanks

In reply to Using variables within use and package statement by perl_devel

Title:
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, 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:
    & &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.