jonnymp316
IS-IT--Management
Hello,
I am inputing text from a file like so:
my $n = 1;
open INFO, '<stored.txt';
my @stuff = <INFO>;
foreach (@stuff){
print $stuff[$n];
if (n < 30) {
$n++
}
}
close INFO;
The problem is that the variable that I am reading from the text file has 12 preceding spaces, I was just wondering if anyone knows how I can parse out those preceding spaces, like the opposite of the chop/chomp command.
Thanks,
-Jonny
I am inputing text from a file like so:
my $n = 1;
open INFO, '<stored.txt';
my @stuff = <INFO>;
foreach (@stuff){
print $stuff[$n];
if (n < 30) {
$n++
}
}
close INFO;
The problem is that the variable that I am reading from the text file has 12 preceding spaces, I was just wondering if anyone knows how I can parse out those preceding spaces, like the opposite of the chop/chomp command.
Thanks,
-Jonny