in reply to print statement problem

You're using the incorrect syntax for split...
#!/usr/local/bin/perl -w my $file = "test.html"; my @title = split(/\./, $file); print "$file\n"; print "$title[1]\n";
Split also works off patterns, so you need to preceed the period with a backslash to escape it.

Hope it helps,
scott.

Replies are listed 'Best First'.
Re: Re: print statement problem
by cal (Beadle) on Jul 22, 2002 at 22:46 UTC
    Thanks,
    I presume the code that was posted contained the syntax change.
    no change, I still cannot get the second print statement to work. Cal