Problem with regexp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bytemania
    New Member
    • Mar 2008
    • 1

    Problem with regexp

    I started learning perl friday!!

    I have one problem with this code... can someone tell me what is wrong here?

    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
     
    sub bisplit {
    	if(length($_)==2){
    		my @lista = split($_[0],$_[1]);
    
    		print (join(":",@lista)),"\n";
    	}
    }
    
    bisplit(/\,/,"12,13,14,15,16");
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    replied to and solved on Tek-Tips

    Comment

    Working...