Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i change into switch statement 3

Status
Not open for further replies.

mtrasp

Programmer
Jun 15, 2009
35
0
0
US
HI please help me how can i change following code into switch statement

if ($operatingsystem eq "170")
{
$Folder = "winvista";
$Readme = "readme_winvista.txt";
}

elsif ($operatingsystem eq "173")
{
$Folder = "winvista64";
$Readme = "readme_winvista64.txt";
}
elsif ($operatingsystem eq "119")
{
$Folder = "winvxp";
$Readme = "readme_winxp.txt";
}
elsif ($operatingsystem eq "210")
{
$Folder = "winxp64";
$Readme = "readme_winxp64.txt";
}
elsif ($operatingsystem eq "541")
{
$Folder = "windows*7 graphics";
$Readme = "readme_windows *7 graphics .txt";
}
elsif ($operatingsystem eq "525")
{
$Folder = "winvista64";
$Readme = "windows *7 /windows *7/windows *.txt";
}
 
hehehe..... got a feeling you're right Ron.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top