Re: system -> $variable

2008-11-29 Thread John W. Krahn
David wrote: I am trying to get 081129 into $dayStamp. #!/usr/bin/perl -w use strict; my $dayStamp; $dayStamp = `date +\'%y%m%d\'` && die "Failure!"; You have three problems with that statement: 1) The '=' operator has higher precedence than the '&&' operator so you need to either enclose

Re: system -> $variable

2008-11-29 Thread Chas. Owens
On Sat, Nov 29, 2008 at 21:25, David <[EMAIL PROTECTED]> wrote: > I am trying to get 081129 into $dayStamp. > > #!/usr/bin/perl -w > use strict; > my $dayStamp; > $dayStamp = `date +\'%y%m%d\'` && die "Failure!"; > print "$dayStamp\n"; > > > My program outputs: > Failure! at /Users/dave/perl/dateLo