Help for this page

Select Code to Download


  1. or download this
    # in the code
    my $arg = hex(shift @ARGV);
    
  2. or download this
    my $arg = chr hex(shift @ARGV);
    
  3. or download this
    my $sep = pack "H2", (shift @ARGV);  # with input being 'd1', for exam
    +ple
    
  4. or download this
    my $sepArg = shift @ARGV;
    my ($hex) = $sepArg =~ /\\x([\da-fA-F]+)/;
    my $sep = chr hex $hex;
    my $str = "field1 $sep field2";
    
  5. or download this
    my $sepArg = shift @ARGV;            # input being '\xd1', for example
    my $str = eval qq("field1 $sepArg field2");