Take a look at File::Slurp. Regards
On Mon, Oct 19, 2015 at 9:18 AM, Prashant Thorat <thorat.prash...@gmail.com> wrote: > Hi All, > > I have a file with multiple lines ,I want to assign all content to > variable & then want to work on it. > Like want to match pattern /window/ from it. > how can it is possible ? > for example - > > open ( F1 ,"file.txt") || die "$!"; > > $a=<F1>; > > if (/window/i){print > "it is present\n"; > } > > > -- Ian http://www.cicsworld.com