in reply to Converting to uppercase and wrapping ''

Do you want single quotes or double quotes around it?

Either way, use qq as your string qualifier and just use your preferred quotes within:

my $up = uc qq{'$folder'};

Replies are listed 'Best First'.
Re^2: Converting to uppercase and wrapping ''
by Anonymous Monk on May 02, 2011 at 05:20 UTC

    I tried above ,in the below code for me if $mk matches 'DATA' it should ignore all the subsequent statements,why is it printing "IN"?Please advise

    $folder= "data"; my $up=uc qq{'$folder'}; print "\n$up"; my $mk= 'DATA'; next if $mk =~ /uc qq{'$folder'}/i; print "\nIN"; --->prints,ideally if above line matches it should not p +rint this line

      Why do you want to put quotes around $folder? Are you really just wanted to test if $folder and $mk are equal except for case?

      If so just do the following:

      next if uc $mk eq uc $folder;