U
Uno
Hello newsgroups,
How do I not have permission here, when all I did is increment from
perl1 to perl2. Does a file get stripped of its priveleges automatically.
$ ./perl1.pl
Placido P. Octopus
Polypacido P. Octopus
Placido P. Octopus
Polypacido Polyp Octopus
Placido P. Octopus
Placido Polyp Octopus
$ ./perl2.pl
bash: ./perl2.pl: Permission denied
$
This is the source:
$ cat perl2.pl
#!/usr/bin/perl
use strict;
use warnings;
my $string = "Placido P. Octopus\n";
my $regex = "P.";
my $string1 = $string;
print $string1;
$string1 =~ s/$regex/Polyp/;
print $string1;
print "\n";
my $string2 = $string;
print $string2;
$string2 =~ s/$regex/Polyp/g;
print $string2;
print "\n";
my $string3 = $string;
print $string3;
$string3 =~ s/\Q$regex/Polyp/;
print $string3;
print "\n";
# that's the last perl I used
# I build off what I have.
my $filename = "text1.txt"
print $filename
$
Thanks for you comment,
and cheers,
How do I not have permission here, when all I did is increment from
perl1 to perl2. Does a file get stripped of its priveleges automatically.
$ ./perl1.pl
Placido P. Octopus
Polypacido P. Octopus
Placido P. Octopus
Polypacido Polyp Octopus
Placido P. Octopus
Placido Polyp Octopus
$ ./perl2.pl
bash: ./perl2.pl: Permission denied
$
This is the source:
$ cat perl2.pl
#!/usr/bin/perl
use strict;
use warnings;
my $string = "Placido P. Octopus\n";
my $regex = "P.";
my $string1 = $string;
print $string1;
$string1 =~ s/$regex/Polyp/;
print $string1;
print "\n";
my $string2 = $string;
print $string2;
$string2 =~ s/$regex/Polyp/g;
print $string2;
print "\n";
my $string3 = $string;
print $string3;
$string3 =~ s/\Q$regex/Polyp/;
print $string3;
print "\n";
# that's the last perl I used
# I build off what I have.
my $filename = "text1.txt"
print $filename
$
Thanks for you comment,
and cheers,