Quick Perl Help (notfred in plz =])

NuclearFusi0n

Diamond Member
Jul 2, 2001
7,028
0
0
$wavfile = sprintf "$album_performer - $album_title - %02d - $performer - $title.wav", $track_no;


i want to make it so that if $album_performer == $performer, it will be "$album_performer - $album_title - (%02d) - $title.wav" but if $performer differs from $album_performer, it should be like it already is

how? :) (basically i just need to know the syntax for a "==" operation)

my guess:

if ($album_performer == $performer) {
$wavfile = sprintf "$album_performer - $album_title - %02d - $title.wav", $track_no;
} else {
$wavfile = sprintf "$album_performer - $album_title - %02d - $performer - $title.wav", $track_no;
}

CLIFF NOTES: Does perl use == like C++ uses ==? If not, how can I do an if variableA equals variableB?