Hello vinoth.ree,
You can try to print both strings and see what kind of special characters they contain. You can also compare the special characters output so you will know at the end if they are same or not.
Sample of code:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use feature 'say';
my $newLineChar = "\n";
my $tabChar = "\t";
my $carriageReturnChar = "\r";
my $formfeedCharacter = "\f";
my $backspaceCharacter = "\b";
my $bellOrBeepCharacter = "\a";
my $escapeCharacter = "\e";
$Data::Dumper::Terse = 1;
$Data::Dumper::Useqq = 1;
my $testString = join "",
$newLineChar,
$tabChar,
$carriageReturnChar,
$formfeedCharacter,
$backspaceCharacter,
$bellOrBeepCharacter,
$escapeCharacter;
say $testString;
say Data::Dumper::qquote($testString);
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
|