Could you please explain the difference b/w the below codes?
when qq is used with eval and without () the o/p is different.
Code:
$hex1='\xd1'; $conv = eval qq "$hex1"; print "CONV IS $conv \n";
CONV IS SCALAR(0x183f1c 4)
Code:
$hex1='\xd1';
$hex1='\xd1'; $conv = eval qq "$hex1"; print "CONV IS $conv \n";
$hex1='\xd1';
use constant HEXD1 => "\xd1"; use constant HEXDC => "\xdc"; $arg = shift(@ARGV); if ($arg eq "HEXD1") { $arg = HEXD1; print " HEX D1 IS $arg \n"; } elsif ($arg eq "HEXDC") { $arg = HEXDC;
use strict; my $seperatorArg; $seperatorArg = shift(@ARGV);
use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # get already active Excel
Leave a comment: