This causes the "Use of uninitialized value in concatenation" error. But if you set $sub_dir = ""; it halts the warnings. Just looked kind of odd/ugly, thus why you are reading this now.#!/usr/local/bin/perl -w use strict; my $dir = '/tmp/'; my $sub_dir; my $file = 'foo.txt'; my $path = "${dir}${sub_dir}${file}"; print "$path\n";
In reply to Handling uninitialized values by THRAK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |