User Profile

Collapse

Profile Sidebar

Collapse
kumeperl
kumeperl
Last Activity: Dec 20 '11, 11:13 AM
Joined: Dec 12 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kumeperl
    replied to search for '\' in PERL
    in Perl
    Thanks for your fast response. after taking your suggestions i did the following changes in code
    Code:
    #!/usr/bin/perl -w
     
    use strict;
    use warnings;
    
    my $count;
    my @list = 'C:\username\Sources';
    
    chomp @list;
    #print OUTPTR "$_\n" foreach @list;
    foreach my $arrchar (@list)
    {
       print "array char = $arrchar";
       if($arrchar =~ m/\\/)
    ...
    See more | Go to post

    Leave a comment:


  • kumeperl
    started a topic search for '\' in PERL
    in Perl

    search for '\' in PERL

    Hello All,
    i am new to perl programming. i am trying to write a program to find number of occurence of '\' in an array [file path]. I tried the follwing code,
    Code:
     
    @list = "C:\username\Sources"
    
    foreach $arrchar (@list)
    {
       print "array char = $arrchar";
       if($_ = /\\/)
                   {
                        print "\nfound one \n";
                   }
    ...
    See more | Go to post
No activity results to display
Show More
Working...