in reply to print statement problem
Split also works off patterns, so you need to preceed the period with a backslash to escape it.#!/usr/local/bin/perl -w my $file = "test.html"; my @title = split(/\./, $file); print "$file\n"; print "$title[1]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: print statement problem
by cal (Beadle) on Jul 22, 2002 at 22:46 UTC |