Windows Perl Scripting Forums » Perl

Can anyone help me in debugging this Perl Code.

(1 post)
  • Started 7 years ago by

No tags yet.

  1. Anonymous

    Hi all,

    I'm a beginner in perl and this is my code.

    $var="C:\Program Files\test\test2";
    @var1=split (/\\/ , $var);
    print "$var1[0] \n";

    The output should be:
    But i receive C:Program Filestesttest2 as output. So anyone can help me to spilt and show only C: as output.

    Posted 7 years ago #

RSS feed for this topic


You must log in to post.