Help!
I guess I'm stumped on some useage for variables.
I've written a menu in perl. The menu script reads from a text file to determine what to display on the menu and then what to do for that selection.
Sample of menu data file($description, $command):
Copy data, Copy $from $to
Delete Data, Delete $data
My menu script reads in the menu data and uses split to put the description into $description and the command into $command.
In my menu script I've defined:
$from = "C:";
$to = "D:";
Then I use:
system ($command);
Which gives this for output:
Copy $from $to
instead of what I had hoped for:
Copy C: D:
Any help desperately appreciated. I can reformat my data of course but I'm stumped on how to get it to change the variables in the data to the value of the varialbes in the script.
-Goliath
I guess I'm stumped on some useage for variables.
I've written a menu in perl. The menu script reads from a text file to determine what to display on the menu and then what to do for that selection.
Sample of menu data file($description, $command):
Copy data, Copy $from $to
Delete Data, Delete $data
My menu script reads in the menu data and uses split to put the description into $description and the command into $command.
In my menu script I've defined:
$from = "C:";
$to = "D:";
Then I use:
system ($command);
Which gives this for output:
Copy $from $to
instead of what I had hoped for:
Copy C: D:
Any help desperately appreciated. I can reformat my data of course but I'm stumped on how to get it to change the variables in the data to the value of the varialbes in the script.
-Goliath