When trying to use split() where the delimiter is passed from the command-line 
( as seen in stub code that follows ), 
the code fails to parse/split input file via some characters (e.g. | ) but it 
runs ok for others (e.g. , ).

Any idea what could be causing this?


Code:
--------

  use vars qw/ %opt /;        
  use Getopt::Std;
  my $optString = 'd:';

  getopts( "$optString", \%opt );

  while(<FILE>) {
    @cfgData = split(/$opt{d}/); 
    ...
  }



      

Reply via email to