in reply to Newbee needs help

Hello Anonymous Monk,

I never deal with your problem, but why not complete the process that you want and then why not just copy the file? You can use the Net::FTP module for copying the file.

This could be a possible solution to your problem.

Update: If I understand correctly your problem you could execute your command, and pipe it to a file where you can copy after. Take a look at System command using array and pipe and also executing external commands.

Hope this helps, let me know if it worked.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Newbee needs help
by Anonymous Monk on Sep 25, 2014 at 18:32 UTC

    Thanks for the information. Let me try to explain better.
    When you enter the cmd "debug isdn verbose", the Adtran starts returning data.
    WilliamsFudge904#debug isdn verbose
    WilliamsFudge904#
    11:46:18:576 ISDN.RES_MGR Reserving an outbound channel.
    11:46:18:577 ISDN.RES_MGR ISDN Channel reserved.
    11:46:18 ISDN.CC_MSG PRI 1 Host>>CC: 00 c633 SETUP_REQ
    11:46:18 ISDN.CC_IE PRI 1 ie: 00 04 0A 80 80 80 90 00 00 00 00 00 82
    11:46:18 ISDN.CC_IE PRI 1 ie: 00 6C 0E 80 80 80 80 33 33 34 37 30 33 36 33 35 37
    11:46:18 ISDN.CC_IE PRI 1 ie: 00 70 0C 80 80 38 30 33 33 36 36 31 36 36 33
    11:46:18 ISDN.CC_IE PRI 1 Qie: 1C 0E 9F 8B 01 00 A1 08 02 01 01 02 01 00 84 00
    11:46:18 ISDN.L2_MSG PRI 1 Sent = 02 01 D6 4E 08 02 46 34 05 04 03 80 90 A2 18 03
    11:46:18 ISDN.L2_MSG PRI 1 A1 83 85 1C 0E 9F 8B 01 00 A1 08 02 01 01 02 01
    11:46:18 ISDN.L2_MSG PRI 1 00 84 00 6C 0C 00 80 33 33 34 37 30 33 36 33 35
    11:46:18 ISDN.L2_MSG PRI 1 37 70 0B 80 38 30 33 33 36 36 31 36 36 33

    I need to send this data to a file.
    Here is the part of the code where I try to gather the information and send it to the file.

    my @output = $t->cmd(String => "debug isdn verbose"); foreach my $line (@output){ printf ADTRANLOGINFO "%s \n",$line; }

      Please show more code - what is $t? Also we need a more detailed problem description than "but the output doesn't write to file" - is the file created or not, does it have zero size or not, and are there any warnings or error messages? See How do I post a question effectively?