Hello there,
I've been using Perl for few years now and I'm lurking here since then. I've always been able to solve my issues with previous posts.
But I just encountered a problem that I don't even know how I should formulate it in the search bar...
Some context :
I do some VHDL simulation on a distant server using SSH. Those simulations create .vcd files that can be viewed with a software called GTKWave through a X11 server.
My job right now, is to develop a simple user interface to do this without the user to have to do command line stuff.
I'm using Net::SSH::Perl (Net::OpenSSH not working on Windows) and Tk.
The SSH command I send to view the .vcd file is :
DISPLAY=192.my_local_ip:42.0 gtkwave waveform.vcd
This command works perfectly in my Perl script (I've removed some code for clarification):
my @selected_waves = $waves_listbox->curselection();
my $wave = $waves_listbox->get($selected_waves[0]);
# $wave = "waveform.vcd";
my ($stdout, $stderr, $exit);
my $gtk_cmd = "$disp_pref gtkwave $simu_folder/$wave";
print "$gtk_cmd\n";
($stdout, $stderr, $exit) = $ssh->cmd($gtk_cmd);
So my problem is when $wave is forced to the value "waveform.vcd" it works well. But when I use the listbox selection nothing happens (no error), GTKWave doesn't show up. I print the command I sent and it is exactly the same (there is no \n hiding in the listbox item, i tried to chomp it).
I guess the variable $wave behaves differently with the listbox->get, but I don't understand why.
I'm curious what you guys think of it.
Thank you