in reply to Re: Perl Expect : Get the complete matched string (updated)
in thread Perl Expect : Get the complete matched string

Hi Hauke, thanks for the updates. Yes , i did try $after_match but the problem is it will pull all the output after the match is found , all i need is to extact only the specific line "Backup file location: /var/log/CPbackup/backups/x.x/x.x.x.x_01_1_Aug_2016_11_05.tgz"
  • Comment on Re^2: Perl Expect : Get the complete matched string (updated)

Replies are listed 'Best First'.
Re^3: Perl Expect : Get the complete matched string (updated)
by haukex (Archbishop) on Aug 02, 2016 at 18:45 UTC

    Hi cryptonite1,

    What does the string you want to get the filename from look like exactly? Use this to print it:

    use Data::Dumper; $Data::Dumper::Useqq=1; print Dumper($after_match);

    Regards,
    -- Hauke D