Split a value

How to split the following value:

$test = "lang_test";

I want the part after '_' to be split to $testoutput.

In the example : $testoutput = "test";

greetings Michel

mmcwAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
maxkirConnect With a Mentor Commented:
$test = "lang_test";
@arr = split(/_/, $test);
$testoutput = $arr[$#arr];
0
 
ozoCommented:
(undef,$testoutput)=split/_/,$test;
0
All Courses

From novice to tech pro — start learning today.