Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
    my $name = 'whatever';
    print $name =~ /[$&<>@/]/ ? 'Yep!' : 'Nope!';
    
  2. or download this
    Unmatched right square bracket at C:\Perl\progs\junk.pl line 5, at end
    + of line
    syntax error at C:\Perl\progs\junk.pl line 5, near "/[$&<>@/]"
    Search pattern not terminated or ternary operator parsed as search pat
    +tern at junk.pl line 5.
    
  3. or download this
    my $name = 'whatever';
    print $name =~ /[$&<>@\/]/ ? 'Yep!' : 'Nope!';
    
  4. or download this
    Use of uninitialized value in concatenation (.) or string at junk.pl l
    +ine 5.
    Nope!
    
  5. or download this
    my $name = 'whatever';
    print $name =~ /[&$<>@\/]/ ? 'Yep!' : 'Nope!';
    
  6. or download this
    my $name = 'what$ever';
    print $name =~ /[\$&<>@\/]/ ? 'Yep!' : 'Nope!';