in reply to Re: do does not read massive containing element w/ ' sign.
in thread «Do» does not read an array containing element w/ «'» sign.

Thank you for your answer!

I do that just like that, -- no open/close file:

my @data=do $file;

-- always worked for me until i got the string, containing _'_ sign.

Replies are listed 'Best First'.
Re^3: do does not read massive containing element w/ ' sign.
by poj (Abbot) on Aug 23, 2015 at 12:24 UTC
    #!perl use strict; # in1.txt # '\'asdasd', 'fghfg, hfgh' my @data = do 'in1.txt'; print "$_\n" for @data;

    The above gives an output of

    'asdasd fghfg, hfgh

    Is the problem that you want this ?

    \'asdasd fghfg, hfgh
    poj
      Yes, but my @data had no data at all -- because do did not process the array right, having one element ' char. But have solved now w/ q~data~ -- so don't worry please on this. Thank you much!