Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I run a file which is begin with "#!/usr/bin/perl -w", I get a error: "syntax error at line 153, near "=~ ?""

Tags:

perl

When I run a file which is begin with #!/usr/bin/perl -w, I get a error:

syntax error at line 153, near "=~ ?"

I try to add "#!/bin/bash", this error is not append, but I get another

error: "line 34: syntax error near unexpected token `('"

line 153 in my file:

($output_volume =~ ?^([\S]+).mnc?) && ($base_name = $1) ||
  die "sharpen_volume failed: output volume does not appear to be"
  ." a minc volume.\n";

line34 in my file: use MNI::Startup qw(nocputimes);

like image 331
nove Avatar asked Aug 22 '19 08:08

nove


People also ask

What happens when you run a file?

The file is copied to your computer, and it's then up to you to do something with it. The big difference is that it's not downloaded into a temporary location. The file is downloaded into either: A default folder, such as “My Documents” or “Downloads” (often the default when you select Save).

What is the command to run a file?

Type "start [filename.exe]" into Command Prompt, replacing "filename" with the name of your selected file. Replace "[filename.exe]" with your program's name. This allows you to run your program from the file path.

How do I run a program file?

Run a program in Microsoft Windows In Windows, to run a program, double-click the executable file or double-click the shortcut icon pointing to the executable file. If you have a hard time double-clicking an icon, you can click the icon once to highlight it and then press the Enter key on the keyboard.

What's the a run file?

A RUN file is a level map for Rune, a 3D action game that uses a third-person perspective and is based on Norse mythology and high fantasy. It contains map information but does not include textures or music data. Rune map files can be created and edited using RunEd, a map editor based on the UnrealEd editor for Unreal 3D.

How do I run an EXE file in Windows?

After you enter the .exe file name, press "Enter" on your keyboard. This automatically executes the .exe file and launches the program attached to the executable file. If your program doesn't automatically launch, check your command lines for accuracy, including the exact name of your file, as issues can be easily resolved.

Is it possible to have a script automatically run when a file?

Is it possible to have a script automatically run any time a file is added to a specific folder? Hey, WM. Yes, this is possible, thanks to the magic of WMI events, which allow you to write a script to monitor for something of interest (like a file being added to a folder) and then take some action any time an event like that occurs.

What is a run file in Linux terminal?

A RUN file is an executable file typically used to install Linux programs. It contains program data and installation instructions. RUN files are often used to distribute device drivers and software among Linux users. You can execute RUN files in the Ubuntu terminal. How do I open a RUN file?


1 Answers

$output_volume =~ ?^([\S]+).mnc?

This used to be valid perl and thus might appear in old code and instructional material.

From perlop:

In the past, the leading m in m?PATTERN? was optional, but omitting it would produce a deprecation warning. As of v5.22.0, omitting it produces a syntax error. If you encounter this construct in older code, you can just add m.

like image 135
Shawn Avatar answered Nov 04 '22 10:11

Shawn