in reply to Re: Wildcards - open a file with one unknown digital character
in thread Wildcards - open a file with one unknown digital character

Thank you for the hints. I escaped _ because of the scalars containing _ in their names. if I use my @cachefiles = glob("/home/cache/*_$scalar_1_2"); it does not recognize $scalar_1 I'd have to write my @cachefiles = glob("/home/cache/*_$scalar_1\_2");
  • Comment on Re^2: Wildcards - open a file with one unknown digital character

Replies are listed 'Best First'.
Re^3: Wildcards - open a file with one unknown digital character
by ikegami (Patriarch) on Jan 11, 2010 at 20:20 UTC
    "...${scalar}_..."
    would also do. The curly method also works where a slash wouldn't.
    "...${abc}def..."