in reply to how can i split a string to an array and convert it into regular expression

I do not understand exactly what string you want to convert, but in order to convert a string into array you can use
@array = split /delimeter/, $my_string;
So you need to figure out what delimeter is. By default it is space.
Vitaly
  • Comment on Re: how can i split a string to an array and convert it into regular expression
  • Download Code

Replies are listed 'Best First'.
Re^2: how can i split a string to an array and convert it into regular expression
by Anonymous Monk on Dec 08, 2007 at 18:53 UTC
    The string i want to convert is $string = 'gat_i2345'
    it has no delimiter
      What do you want the array to contain? ('gat', 'i2345')? Then _ is the delimiter. If you want to add the entire string to the array, simply use push @array, $string;.