As buckroe2 mentioned, the split character you supply is a regular expression, which can be translated into one single
character or many characters.
In your particular case, many different versions would work, as long as it translates into the single character /.
Here is a base test script you can use:
CODE
$line="http://www.abc.com/HTTP://www.def.com";
@array=split "/", $line;
foreach $i (@array){
printf("%s\n",$i);}
which gives as results:
CODE
http:
www.abc.com
HTTP:
www.def.com
Tool completed successfully
The empty lines represent a null field caused by the double slashes // .
The following expressions all translate to a single /:
"/", '/', '[/]'.
In a regular expression, single quotes will cause an interpretation 'as-is' without further translation. Brackets [] will enclose alternative characters, and contents of "" will be further translated according to regular expression rules.
Perl.org has an excellent tutorial on regular expressions that explains everything about it:
http://perldoc.perl.org/perlretut.html
Reply