Perl cisco copy running to startup

Hi all,

i have a small simple perl that i cant make it work it is really stupid but i cant find solution and i needed fast.
im trying to copy running to startup on a cisco router and show me the output like is ok

Destination filename [startup-config]?
Building configuration...
[OK]

so the code i have is

use Net::Telnet::Cisco;

$device = "172.16.83.251";

  my $session = Net::Telnet::Cisco->new(Host => "$device",
									Input_log => "perllogrouter/router83.log",
										);
  $session->login('admin', 'admin');

  # Execute a command
  @output = $session->cmd ('copy running-config startup-config');
    print @output;
  @output = $session->cmd ('show startup-config');
  print @output;
  $session->close;

and the problem i have is that when it uses the command "copy running-config startup-config" it have to use another input "Enter" to continue and that is my problem here ... it can't continue because i have to use this command "Destination filename [startup-config]? "
sorry for bad English

---------- Post updated at 06:11 AM ---------- Previous update was at 05:25 AM ----------

Well i have found the solution ....

@output = $session->cmd("copy running-config "
                    . "startup-config\n");
 
  
  print @output;

tnx any way :wink: