I am trying to get something from command line where it reads the string and inserts the string inside of itself. Such as
myscript name
output would be:
nanameme
I know I need to use the substr() and length() functions. Am I getting close here??
[tt]
my $argv = $ARGV[0] || die "No parameters given.\n";
foreach $argv
{
substr($argv, 3, length($argv))
print $argv;
}[/tt]
myscript name
output would be:
nanameme
I know I need to use the substr() and length() functions. Am I getting close here??
[tt]
my $argv = $ARGV[0] || die "No parameters given.\n";
foreach $argv
{
substr($argv, 3, length($argv))
print $argv;
}[/tt]