I've been trying to figure out how to run this example for a while now and I'm still stuck on how to print the date. Below is the example I'm working on.
(The Script for Unix/Linux)
# Backquotes and command substitution
1 print "The date is ", 'date'; # Windows users: 'date /T'
2 print "The date is 'date'", ".\n"; # Backquotes treated literally
3 $directory='pwd'; # Windows users: 'cd'
4 print "\nThe current directory is $directory.";
(Output)
1 The date is Mon Jun 25 17:27:49 PDT 2007.
2 The date is 'date'.
4 The current directory is /home/jody/ellie/perl.
This is my work and output.
print "The date is ", 'date /T';
print "The date is 'date'", ".\n";
$directory='cd';
print "\nThe current directory is $directory.";
(Output)
The date is date /TThe date is 'date'.
The current directory is cd.
Any help with this is greatly appreciated. Thanks.