On 10/29/07, jiangfan <[EMAIL PROTECTED]> wrote: > What is wrong with this statement? > > my $time = sprintf( "0x%08x", `date +%s` );
I don't know what's wrong with it on your machine, but I'd change the command in backticks to be Perl's time operator: my $time = sprintf("0x%08x", time); Doesn't that do the same thing? Most simple shell commands aren't needed from Perl. > "Use of uninitialized value in sprintf at /opt/MoteWorks/tos/../make/ > scripts/ident_flags line 15." Maybe your date command doesn't support that format. But Perl's time operator should work everywhere. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/