Logo

Programming-Idioms

Define variables a, b and c in a concise way.
Explain if they need to have the same type.
Implementation
Perl

Implementation edit is for fixing errors and enhancing with metadata. Please do not replace the code below with a different implementation.

Instead of changing the code of the snippet, consider creating another Perl implementation.

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
a, b, c := 42, "hello", 5.0
let (a, b, c) = (42, "hello", 5.0);
a, b, c = 42, 'hello', 5.0
const [a, b, c] = [42, "hello", 5.0];
a, b, c = 42, 'hello', 5.0
(a, b, c) = (42, "hello", 5.0)
var (a, b, c) = (42, "hello", 5.0);
{A, B, C} = {42, "hello", 5.0}.
integer :: a, b, c
val (a, b, c) = listOf("A", "B", "C")
var a = 42, b = "Hello", c = 5.0;