|  | Posted by "Sonia" on 08/01/05 22:46 
Hi
 In Perl I have a part of a script....
 
 # cut..
 
 my $line = '!v2005*08|05+09?04^19*!';
 
 my ( $s_code, $year, $month, $day, $hour, $minute, $second, $e_code ) =
 unpack ( "x1 A1 A4 x1 A2 x1 A2 x1 A2 x1 A2 x1 A2 A1", $line );
 
 print $s_code . "\n";
 print $year . "\n";
 print $month . "\n";
 print $day . "\n";
 print $hour . "\n";
 print $minute . "\n";
 print $second . "\n";
 print $e_code . "\n";
 
 sleep 10; # so we can see it in the command window
 
 
 
 In Perl this runs without trouble, in PHP it does not seem to work the same
 way. Can someone explain to me what I need to do differently to
 allow PHP to understand what I am trying to do!
 
 <?
 
 my $line = '!v2005*08|05+09?04^19*!';
 
 $output = unpack ( "x1 A1 A4 x1 A2 x1 A2 x1 A2 x1 A2 x1 A2 A1", $line );
 
 print_r ( $output );
 
 ?>
 
 
 Thanks
 
 SD
  Navigation: [Reply to this message] |